forked from devopshobbies/docker-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDjango
More file actions
27 lines (18 loc) · 664 Bytes
/
Django
File metadata and controls
27 lines (18 loc) · 664 Bytes
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
FROM python:3.8
LABEL CREATOR="AMIRAJOODANI | https://nextsysadmin.ir"
ENV PYTHONUNBUFFERED 1
ENV DJANGO_SUPERUSER_PASSWORD Nocnoc123456
# Set working directory
WORKDIR /app
COPY . /app
# Installing requirements
COPY requirements/req.txt /app
RUN pip3 install --no-cache-dir pip && \
pip3 install -r req.txt && \
pip3 install django gunicorn
# Collect static files
CMD python3 manage.py makemigrations --no-input && \
python3 manage.py migrate --no-input && \
python3 manage.py collectstatic --no-input && \
python3 manage.py createsuperuser --user admin --email admin@localhost --no-input; \
gunicorn -b 0.0.0.0:8000 config.wsgi