We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 096b4cd commit c313f8dCopy full SHA for c313f8d
1 file changed
Dockerfile
@@ -0,0 +1,29 @@
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
0 commit comments