Skip to content
This repository was archived by the owner on Feb 15, 2023. It is now read-only.

Commit 24a1ea8

Browse files
committed
switch to requirements.txt and fix livereload not found
1 parent ea8e840 commit 24a1ea8

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ RUN pip3 install --upgrade pip==21.0.1 \
1212
&& pip3 install --upgrade pipenv==2020.11.15 \
1313
&& pipenv install --deploy
1414

15+
RUN pipenv lock -r > requirements.txt && pip3 install -r requirements.txt
16+
1517
USER 1001
1618

1719
COPY . /opt/app-root/src
@@ -20,4 +22,4 @@ ENV PORT 3000
2022

2123
EXPOSE 3000
2224

23-
CMD ["python3", "manage.py", "start"]
25+
CMD exec python3 manage.py start

Dockerfile-tools

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ RUN yum -y install --disableplugin=subscription-manager wget \
1010
&& yum --disableplugin=subscription-manager clean all
1111

1212
RUN pip3 install pipenv
13-
RUN pipenv install
13+
RUN pipenv install --deploy
14+
RUN pipenv lock -r > requirements.txt && pip3 install -r requirements.txt
1415

1516
# Update python command to point to python3 install
1617
RUN alternatives --set python /usr/bin/python3

manage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import sys
44

55
if __name__ == "__main__":
6-
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pythondjangoapp.settings.development")
6+
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pythondjangoapp.settings.production")
77
try:
88
from django.core.management import execute_from_command_line
99
except ImportError:

0 commit comments

Comments
 (0)