mirror of
https://github.com/asimonson1125/asimonson1125.github.io.git
synced 2026-02-25 05:09:49 -06:00
fixing low-iq moves
This commit is contained in:
13
Dockerfile
13
Dockerfile
@@ -10,16 +10,15 @@ RUN apt-get install -y python3-pip nginx gunicorn supervisor
|
|||||||
# do we really need venv?
|
# do we really need venv?
|
||||||
|
|
||||||
# Setup flask application
|
# Setup flask application
|
||||||
RUN mkdir /deploy
|
RUN mkdir -p /deploy/app
|
||||||
RUN mkdir /deploy/app
|
|
||||||
COPY src /deploy/app
|
COPY src /deploy/app
|
||||||
RUN pip install -r /deploy/app/requirements.txt
|
RUN pip install -r /deploy/app/requirements.txt
|
||||||
|
|
||||||
# Setup nginx
|
# Setup nginx
|
||||||
RUN rm /etc/nginx/sites-enabled/default
|
RUN rm /etc/nginx/sites-enabled/default
|
||||||
COPY flask.conf /etc/nginx/sites-available/
|
COPY flask.conf /etc/nginx/sites-available/
|
||||||
RUN ln -s /etc/nginx/sites-available/flask.conf /etc/nginx/sites-enabled/flask.conf
|
RUN ln -s /etc/nginx/sites-available/flask.conf /etc/nginx/sites-enabled/flask.conf && \
|
||||||
RUN echo "daemon off;" >> /etc/nginx/nginx.conf
|
echo "daemon off;" >> /etc/nginx/nginx.conf
|
||||||
|
|
||||||
# Setup supervisord
|
# Setup supervisord
|
||||||
RUN mkdir -p /var/log/supervisor
|
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
|
COPY gunicorn.conf /etc/supervisor/conf.d/gunicorn.conf
|
||||||
|
|
||||||
# Permissions
|
# Permissions
|
||||||
RUN adduser --disabled-password --gecos '' supervisor
|
RUN adduser --disabled-password --gecos '' supervisor && \
|
||||||
RUN chmod -R 775 /var/*
|
chmod -R 775 /var/* && \
|
||||||
RUN chown -R supervisor /var/*
|
chown -R supervisor /var/*
|
||||||
|
|
||||||
# Entrypoint
|
# Entrypoint
|
||||||
USER supervisor
|
USER supervisor
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
nodaemon=true
|
nodaemon=true
|
||||||
logfile=/dev/null
|
logfile=/dev/null
|
||||||
loglevel=critical
|
loglevel=critical
|
||||||
environment=HOME="/",USER="root"
|
environment=HOME="/",USER="supervisor"
|
||||||
user=supervisor
|
user=supervisor
|
||||||
redirect_stderr=true
|
redirect_stderr=true
|
||||||
stdout_logfile=/dev/null
|
stdout_logfile=/dev/null
|
||||||
@@ -11,7 +11,7 @@ stdout_logfile=/dev/null
|
|||||||
command=/usr/sbin/nginx
|
command=/usr/sbin/nginx
|
||||||
logfile=/dev/null
|
logfile=/dev/null
|
||||||
loglevel=critical
|
loglevel=critical
|
||||||
environment=HOME="/",USER="root"
|
environment=HOME="/",USER="supervisor"
|
||||||
user=supervisor
|
user=supervisor
|
||||||
redirect_stderr=true
|
redirect_stderr=true
|
||||||
stdout_logfile=/dev/null
|
stdout_logfile=/dev/null
|
||||||
Reference in New Issue
Block a user