Skip to content

Commit 660eb82

Browse files
author
Dmitry Berezovsky
committed
moved guinicorn start into separate file
1 parent c313f8d commit 660eb82

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

Dockerfile

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,7 @@ RUN source /srv/virtenv/bin/activate && pip install gunicorn==19.4.5
1818

1919
EXPOSE $APP_PORT
2020
VOLUME ["$LOG_DIR"]
21+
ADD start-gunicorn.sh /home/app/start-gunicorn.sh
22+
#RUN chmod +x /home/app/start-gunicorn.sh
2123

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
24+
CMD /home/app/start-gunicorn.sh

start-gunicorn.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/sh
2+
3+
source /srv/virtenv/bin/activate
4+
5+
gunicorn $APP_MODULE \
6+
--name $APP_PROCESS_NAME \
7+
--bind 0.0.0.0:$APP_PORT \
8+
--workers $APP_WORKERS_COUNT \
9+
--log-level=$APP_LOG_LEVEL \
10+
--log-file="$LOG_DIR/gunicorn.log" \
11+
--access-logfile="$LOG_DIR/access.log" \
12+
--chdir=$APPLICATION_DIR

0 commit comments

Comments
 (0)