diff options
Diffstat (limited to 'Dockerfile')
| -rw-r--r-- | Dockerfile | 20 |
1 files changed, 11 insertions, 9 deletions
@@ -1,6 +1,8 @@ -FROM alpine:latest +FROM docker.io/alpine:3.14 -RUN apk update && apk add python3 py3-setuptools py3-virtualenv postgresql-client +RUN apk update +RUN apk add nginx python3 py3-pip py3-setuptools py3-virtualenv \ + postgresql-client py3-psycopg2 postgresql RUN apk add linux-headers postgresql-dev gcc python3-dev libc-dev COPY app/requirements.txt /requirements.txt @@ -8,17 +10,17 @@ RUN pip3 install --no-cache-dir -r /requirements.txt RUN rm /requirements.txt RUN pip3 install --no-cache-dir uwsgi - RUN apk del linux-headers postgresql-dev gcc python3-dev libc-dev -# Feel free to change the UID if necessary -RUN adduser -D -H -u 1000 app +RUN mkdir /app /static -# RUN apk add uwsgi-python3 +COPY app /app +WORKDIR /app -RUN mkdir /app /static && chown app /app /static +ENV STATIC_ROOT=/static -USER app +RUN python3 manage.py collectstatic -CMD [ "uwsgi", "--ini", "/app/uwsgi.ini" ] +COPY entrypoint.sh / +ENTRYPOINT /entrypoint.sh |
