WIP Dockerizing API.

This commit is contained in:
Jonathan Bernard
2019-04-07 03:07:17 -05:00
parent fcf0cf18f6
commit 3e68462c28
5 changed files with 50 additions and 7 deletions

21
api/Dockerfile Normal file
View File

@ -0,0 +1,21 @@
FROM 32707f62ca3b AS build
MAINTAINER jonathan@jdbernard.com
#RUN apt-get install -y libssl-dev
COPY personal_measure_api.nimble /pm-api/
COPY src /pm-api/src
WORKDIR /pm-api
RUN nimble build -y
FROM alpine
#RUN apt-get install -y postgresql-client
RUN apk -v --update add --no-cache \
ca-certificates \
libressl2.7-libssl \
libressl2.7-libcrypto \
pcre \
postgresql-client
COPY --from=build /pm-api/personal_measure_api /
COPY personal_measure_api.config.prod.json /personal_measure_api.config.json
CMD ["/personal_measure_api", "serve"]