Skip to content

Commit e968dd9

Browse files
feat: Add Dockerfile, update .dockerignore.
1 parent 2076000 commit e968dd9

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

.dockerignore

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
.dockerignore
22
Dockerfile
33
README.md
4+
5+
*.pyc
6+
*.pyo
7+
*.pyd
8+
__pycache__
9+
10+
env/
411
.venv/
5-
__pycache__/
12+
.env
13+
.env.example
14+
.venv/
15+
16+
.git
17+
.gitignore

Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM python:3.12-alpine3.21
2+
3+
ENV PYTHONBUFFERED=1 \
4+
DJANGO_DEBUG=False \
5+
SERVER_ADDRESS=0.0.0.0:8080 \
6+
SERVER_PORT=8080
7+
8+
WORKDIR /usr/src/app
9+
10+
COPY . .
11+
12+
RUN pip install --upgrade pip && \
13+
pip install -r requirements/prod.txt
14+
15+
CMD ["sh", "-c", "cd /usr/src/app/promo_code && python manage.py migrate --noinput && gunicorn promo_code.wsgi:application --bind ${SERVER_ADDRESS}"]
16+
17+
EXPOSE ${SERVER_PORT}

0 commit comments

Comments
 (0)