2020-10-26 17:39:44 +01:00
|
|
|
FROM python:3.8-alpine
|
|
|
|
|
|
|
|
RUN apk update && apk add su-exec \
|
|
|
|
&& pip3 install pipenv
|
|
|
|
|
2020-11-08 14:42:55 +01:00
|
|
|
RUN mkdir -p /data
|
|
|
|
|
2020-10-26 17:39:44 +01:00
|
|
|
COPY . /app
|
|
|
|
WORKDIR /app
|
|
|
|
|
2020-10-30 00:59:31 +01:00
|
|
|
RUN pipenv install
|
2020-11-09 05:37:17 +01:00
|
|
|
RUN pipenv install gunicorn
|
2020-10-30 00:59:31 +01:00
|
|
|
|
2020-11-08 14:42:55 +01:00
|
|
|
ENV SNIP_DATABASE="sqlite"
|
|
|
|
ENV SNIP_DATABASE_URI="sqlite:////data/snip.db"
|
|
|
|
ENV SNIP_FLASK_HOST="0.0.0.0"
|
2020-11-06 02:28:29 +01:00
|
|
|
|
2020-10-26 17:39:44 +01:00
|
|
|
EXPOSE 5000
|
2020-11-09 05:37:17 +01:00
|
|
|
CMD ["pipenv", "run", "gunicorn", "-b0.0.0.0:5000", "snip:app"]
|