Skip to content

Commit 040abaf

Browse files
committed
Add docker configurations
1 parent bc3e329 commit 040abaf

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM python:3.5
2+
3+
WORKDIR /app
4+
5+
COPY . /app
6+
7+
RUN pip install -r requirements.txt
8+
9+
EXPOSE 8096
10+
EXPOSE 80
11+
12+
CMD ["python", "manage.py", "makemigrations"]
13+
CMD ["python", "manage.py", "migrate"]
14+
CMD ["python", "manage.py", "runserver"]

docker-compose.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
version: '3'
2+
services:
3+
web:
4+
build: .
5+
ports:
6+
- "5000:5000"
7+
volumes:
8+
- .:/code
9+
- logvolume01:/var/log
10+
links:
11+
- redis
12+
command: python manage.py runserver 0.0.0.0:5000
13+
redis:
14+
image: redis
15+
volumes:
16+
logvolume01: {}

0 commit comments

Comments
 (0)