-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile.dev
More file actions
33 lines (24 loc) · 1.19 KB
/
Dockerfile.dev
File metadata and controls
33 lines (24 loc) · 1.19 KB
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
FROM python:3.6.4-slim
MAINTAINER team.overeats@gmail.com
# apt-get으로 nginx supervisor 설치
RUN apt-get -y update
RUN apt-get -y dist-upgrade
RUN apt-get -y install build-essential nginx supervisor
# requirments만 복사
COPY .requirements /srv/.requirements
# pip install
WORKDIR /srv
RUN pip install -r /srv/.requirements/dev.txt
ENV BUILD_MODE dev
ENV DJANGO_SETTINGS_MODULE config.settings.dev
# 소스폴더를 통째로 복사
COPY . /srv/project
# nginx 설정파일을 복사 및 링크
RUN cp -f /srv/project/.config/${BUILD_MODE}/nginx.conf /etc/nginx/nginx.conf &&\
cp -f /srv/project/.config/${BUILD_MODE}/nginx-app.conf /etc/nginx/sites-available/ &&\
rm -f /etc/nginx/sites-enabled/* &&\
ln -sf /etc/nginx/sites-available/nginx-app.conf /etc/nginx/sites-enabled/
# supervisor 설정파일을 복사
RUN cp /srv/project/.config/${BUILD_MODE}/supervisord.conf /etc/supervisor/conf.d/
# pkill nginx 후 supervisord 실행
CMD pkill nginx; supervisord -n