snip/Dockerfile

19 lines
332 B
Docker
Raw Normal View History

2020-10-26 16:39:44 +00:00
FROM python:3.8-alpine
RUN apk update && apk add su-exec \
&& pip3 install pipenv
RUN mkdir -p /data
2020-10-26 16:39:44 +00:00
COPY . /app
WORKDIR /app
2020-10-29 23:59:31 +00:00
RUN pipenv install
RUN pipenv install gunicorn
2020-10-29 23:59:31 +00:00
ENV SNIP_DATABASE="sqlite"
ENV SNIP_DATABASE_URI="sqlite:////data/snip.db"
2020-10-26 16:39:44 +00:00
EXPOSE 5000
CMD ["pipenv", "run", "gunicorn", "-b0.0.0.0:5000", "snip:app"]