2020-10-26 16:39:44 +00:00
|
|
|
FROM python:3.8-alpine
|
|
|
|
|
|
|
|
RUN apk update && apk add su-exec \
|
|
|
|
&& pip3 install pipenv
|
|
|
|
|
2020-11-08 13:42:55 +00:00
|
|
|
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
|
2020-11-09 04:37:17 +00:00
|
|
|
RUN pipenv install gunicorn
|
2020-10-29 23:59:31 +00:00
|
|
|
|
2020-11-08 13:42:55 +00:00
|
|
|
ENV SNIP_DATABASE="sqlite"
|
|
|
|
ENV SNIP_DATABASE_URI="sqlite:////data/snip.db"
|
|
|
|
ENV SNIP_FLASK_HOST="0.0.0.0"
|
2020-11-06 01:28:29 +00:00
|
|
|
|
2020-10-26 16:39:44 +00:00
|
|
|
EXPOSE 5000
|
2020-11-09 04:37:17 +00:00
|
|
|
CMD ["pipenv", "run", "gunicorn", "-b0.0.0.0:5000", "snip:app"]
|