Skip to content

Commit c313f8d

Browse files
author
Dmitry Berezovsky
committed
initial
1 parent 096b4cd commit c313f8d

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

Dockerfile

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)