From 2f58e0f734fbc71ca3fc7c8af5d9360cce8e1b19 Mon Sep 17 00:00:00 2001 From: Andrew Simonson Date: Sun, 29 Jan 2023 10:05:07 -0600 Subject: [PATCH] fixing low-iq moves --- Dockerfile | 13 ++++++------- supervisord.conf | 4 ++-- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index bb99047..3b9c7a7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,16 +10,15 @@ RUN apt-get install -y python3-pip nginx gunicorn supervisor # do we really need venv? # Setup flask application -RUN mkdir /deploy -RUN mkdir /deploy/app +RUN mkdir -p /deploy/app COPY src /deploy/app RUN pip install -r /deploy/app/requirements.txt # Setup nginx RUN rm /etc/nginx/sites-enabled/default COPY flask.conf /etc/nginx/sites-available/ -RUN ln -s /etc/nginx/sites-available/flask.conf /etc/nginx/sites-enabled/flask.conf -RUN echo "daemon off;" >> /etc/nginx/nginx.conf +RUN ln -s /etc/nginx/sites-available/flask.conf /etc/nginx/sites-enabled/flask.conf && \ + echo "daemon off;" >> /etc/nginx/nginx.conf # Setup supervisord RUN mkdir -p /var/log/supervisor @@ -27,9 +26,9 @@ COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf COPY gunicorn.conf /etc/supervisor/conf.d/gunicorn.conf # Permissions -RUN adduser --disabled-password --gecos '' supervisor -RUN chmod -R 775 /var/* -RUN chown -R supervisor /var/* +RUN adduser --disabled-password --gecos '' supervisor && \ + chmod -R 775 /var/* && \ + chown -R supervisor /var/* # Entrypoint USER supervisor diff --git a/supervisord.conf b/supervisord.conf index 8a58263..bf077dc 100644 --- a/supervisord.conf +++ b/supervisord.conf @@ -2,7 +2,7 @@ nodaemon=true logfile=/dev/null loglevel=critical -environment=HOME="/",USER="root" +environment=HOME="/",USER="supervisor" user=supervisor redirect_stderr=true stdout_logfile=/dev/null @@ -11,7 +11,7 @@ stdout_logfile=/dev/null command=/usr/sbin/nginx logfile=/dev/null loglevel=critical -environment=HOME="/",USER="root" +environment=HOME="/",USER="supervisor" user=supervisor redirect_stderr=true stdout_logfile=/dev/null \ No newline at end of file