Skip to content

Commit 22897eb

Browse files
author
JeremyAndress
committed
🐳 add new config for stage and production
1 parent ffb98f8 commit 22897eb

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

compose/production/Dockerfile

+9-10
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
1-
FROM python:3.6
2-
# ENV PYTHONDONTWRITEBYTECODE 1
1+
FROM python:3.6.11
32
ENV PYTHONUNBUFFERED 1
4-
5-
RUN mkdir -p /home/app
6-
7-
ENV HOME=/home/app
3+
ENV ENVTYPE=production
84
ENV APP_HOME=/home/app/web
9-
RUN mkdir $APP_HOME
5+
RUN mkdir -p $APP_HOME
106
WORKDIR $APP_HOME
117

12-
ADD /requirements/production.txt $APP_HOME
8+
ADD /requirements/$ENVTYPE.txt $APP_HOME
9+
RUN pip install -r /home/app/web/$ENVTYPE.txt; mkdir /log;
10+
COPY /src/ $APP_HOME
11+
CMD ["gunicorn","wsgi:app","-b","0.0.0.0:8011","--log-level=info"]
12+
13+
1314

14-
RUN pip install gunicorn; \
15-
pip install -r /home/app/web/production.txt; mkdir /log;
1615

1716

compose/stage/Dockerfile

+13-12
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1-
FROM python:3.6
2-
# ENV PYTHONDONTWRITEBYTECODE 1
1+
FROM python:3.6.11
32
ENV PYTHONUNBUFFERED 1
4-
5-
RUN mkdir -p /home/app
6-
7-
ENV HOME=/home/app
3+
ENV ENVTYPE=local
4+
ENV https_proxy=http://10.46.0.210:3128
5+
ENV http_proxy=http://10.46.0.210:3128
86
ENV APP_HOME=/home/app/web
9-
RUN mkdir $APP_HOME
7+
RUN mkdir -p $APP_HOME
108
WORKDIR $APP_HOME
119

12-
ADD /requirements/local.txt $APP_HOME
10+
ADD /requirements/$ENVTYPE.txt $APP_HOME
11+
RUN pip install -r /home/app/web/$ENVTYPE.txt; mkdir /log;
12+
COPY /src/ $APP_HOME
13+
CMD ["gunicorn","wsgi:app","-b","0.0.0.0:8011","--log-level=info"]
14+
15+
16+
17+
1318

14-
RUN export https_proxy=http://10.46.0.210:3128; \
15-
export http_proxy=http://10.46.0.210:3128; \
16-
pip install gunicorn; \
17-
pip install -r /home/app/web/local.txt; mkdir /log;

0 commit comments

Comments
 (0)