From 0e82caee0b427dcb957ff78a6c2779e7d9e27dde Mon Sep 17 00:00:00 2001 From: Mitch Riedstra Date: Sat, 14 Sep 2019 00:06:50 -0400 Subject: Fully automated setup and forward port 36200 --- Dockerfile | 30 +++++++----------------------- 1 file changed, 7 insertions(+), 23 deletions(-) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index 62693b7..476dccd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,40 +1,24 @@ FROM alpine:latest -RUN apk update && apk add python3 py3-setuptools py3-virtualenv - -RUN apk add postgresql-dev gcc python3-dev libc-dev +RUN apk update && apk add python3 py3-setuptools py3-virtualenv postgresql-client +RUN apk add linux-headers postgresql-dev gcc python3-dev libc-dev COPY app/requirements.txt /requirements.txt - RUN pip3 install --no-cache-dir -r /requirements.txt - -RUN apk add linux-headers - +RUN rm /requirements.txt RUN pip3 install --no-cache-dir uwsgi -RUN apk del linux-headers -RUN apk add postgresql-client +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 uwsgi +RUN adduser -D -H -u 1000 app # RUN apk add uwsgi-python3 -RUN rm /requirements.txt -RUN mkdir /app && chown uwsgi /app -RUN mkdir /static && chown uwsgi /static +RUN mkdir /app /static && chown app /app /static -USER uwsgi +USER app CMD [ "uwsgi", "--ini", "/app/uwsgi.ini" ] - -# WORKDIR /app - -# CMD [ "uwsgi", "--socket", "0.0.0.0:9200", \ -# "--env", "CUSTOM_CONFIG=/app/config.yml", \ -# "--processes", "1", \ -# "--threads", "4", \ -# "--uid", "uwsgi", \ -# "wsgi:application" ] -- cgit v1.2.3