forked from eyubech/PONGIT
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
57 lines (53 loc) · 1.18 KB
/
docker-compose.yml
File metadata and controls
57 lines (53 loc) · 1.18 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
services:
front-end:
depends_on:
- backend
build:
context: ./front-end
ports:
- "8000:80"
- "443:443"
volumes:
- ./front-end:/usr/share/nginx/html
- ./front-end/nginx.conf:/etc/nginx/nginx.conf
backend:
build:
context: ./server
ports:
- "8080:8080"
volumes:
- ./server:/app
environment:
- DJANGO_SETTINGS_MODULE=server.settings
- POSTGRES_DB=bugfreetranscendanceDB
- POSTGRES_USER=ayoub
- POSTGRES_PASSWORD=ayoubayoub
- REDIS_HOST=redis
- REDIS_PORT=6379
depends_on:
- db
- redis
command: >
sh -c "redis-server --daemonize yes &&
python manage.py migrate &&
python manage.py runserver 0.0.0.0:8080"
db:
image: postgres:13
environment:
POSTGRES_DB: bugfreetranscendanceDB
POSTGRES_USER: ayoub
POSTGRES_PASSWORD: ayoubayoub
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
redis:
image: redis:latest
ports:
- "6379:6379"
volumes:
- redis_data:/data
command: redis-server --appendonly yes
volumes:
postgres_data:
redis_data: