snip/Dockerfile
Armin Friedl 95683625da
All checks were successful
continuous-integration/drone/push Build is passing
Create database schema in docker container
2020-11-06 02:28:29 +01:00

17 lines
324 B
Docker

FROM python:3.8-alpine
RUN apk update && apk add su-exec \
&& pip3 install pipenv
COPY . /app
WORKDIR /app
RUN pipenv install
ENV FLASK_APP=snip
ENV FLASK_ENV=production
RUN ["pipenv", "run", "python", "-c", "from snip import db; db.create_all()"]
EXPOSE 5000
CMD ["pipenv", "run", "flask", "run", "--host=0.0.0.0"]