File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change 1+ FROM logicify/python3
2+ MAINTAINER "Dmitry Berezovsky <dmitry.berezovsky@logicify.com>"
3+
4+ ENV APP_PROCESS_NAME="wsgi-application"
5+ ENV APP_MODULE="wsgi"
6+ ENV APP_WORKERS_COUNT="3"
7+ ENV APP_LOG_LEVEL="info"
8+ ENV APP_PORT="8000"
9+ ENV LOG_DIR="/srv/logs"
10+
11+ USER root
12+
13+ RUN mkdir $LOG_DIR \
14+ && chown app:app $LOG_DIR
15+
16+ USER app
17+ RUN source /srv/virtenv/bin/activate && pip install gunicorn==19.4.5
18+
19+ EXPOSE $APP_PORT
20+ VOLUME ["$LOG_DIR" ]
21+
22+ CMD gunicorn $APP_MODULE \
23+ --name $APP_PROCESS_NAME \
24+ --bind 0.0.0.0:$APP_PORT \
25+ --workers $APP_WORKERS_COUNT \
26+ --log-level=$APP_LOG_LEVEL \
27+ --log-file="$LOG_DIR/gunicorn.log" \
28+ --access-logfile="$LOG_DIR/access.log" \
29+ --chdir=$APPLICATION_DIR
You can’t perform that action at this time.
0 commit comments