Skip to content

Commit 5a0d868

Browse files
author
Dmitry Berezovsky
committed
Use stdout for logging
1 parent 1ae02a5 commit 5a0d868

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

Dockerfile

+1-8
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,11 @@ ENV APP_WORKERS_COUNT="4"
77
ENV TIMEOUT="30"
88
ENV APP_LOG_LEVEL="info"
99
ENV APP_PORT="8000"
10-
ENV LOG_DIR="/srv/logs"
10+
ENV APPLICATION_DIR="/srv/application"
1111

12-
USER root
13-
14-
RUN mkdir $LOG_DIR \
15-
&& chown app:app $LOG_DIR
16-
17-
USER app
1812
RUN source /srv/virtenv/bin/activate && pip install gunicorn==19.4.5
1913

2014
EXPOSE $APP_PORT
21-
VOLUME ["$LOG_DIR"]
2215
ADD start-gunicorn.sh /home/app/start-gunicorn.sh
2316
#RUN chmod +x /home/app/start-gunicorn.sh
2417

start-gunicorn.sh

+1-2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,5 @@ gunicorn $APP_MODULE \
1616
--workers $APP_WORKERS_COUNT \
1717
--timeout $TIMEOUT \
1818
--log-level=$APP_LOG_LEVEL \
19-
--log-file="$LOG_DIR/gunicorn.log" \
20-
--access-logfile="$LOG_DIR/access.log" \
19+
--log-file="-" \
2120
--chdir=$APPLICATION_DIR

0 commit comments

Comments
 (0)