forked from maro99/library_movie
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.production
43 lines (28 loc) · 1.35 KB
/
Dockerfile.production
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
FROM eb-docker:base
MAINTAINER nadcdc4@gmail.com
ENV PROJECT_DIR /srv/project
ENV BUILD_MODE production
#nginx ,supervisor install
ENV DJANGO_SETTINGS_MODULE config.settings.${BUILD_MODE}
# dev용 requirements 설치
COPY ./requirements.txt /srv/
RUN pip install -r /srv/requirements.txt
# Copy projects files
COPY . ${PROJECT_DIR}
#WORKDIR ${PROJECT_DIR}
# Nginx 설정파일들 복사 및 enabled로 링크
RUN cp -f /srv/project/.config/${BUILD_MODE}/nginx.conf \
/etc/nginx/nginx.conf && \
# available에 nginx_app.conf파일 복사
cp -f /srv/project/.config/${BUILD_MODE}/nginx_app.conf \
/etc/nginx/sites-available/ && \
# 이미 sites-enabled에 있던 모든 내용 삭제
rm -f /etc/nginx/sites-enabled/* && \
# available에 있는 nginx_app.conf를 enabled로 링크.
ln -sf /etc/nginx/sites-available/nginx_app.conf \
/etc/nginx/sites-enabled/
# Supervisor 설정복사
RUN cp -f ${PROJECT_DIR}/.config/${BUILD_MODE}/supervisor.conf \
/etc/supervisor/conf.d
# RUN supervisor
CMD supervisord -n