-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
43 lines (39 loc) · 906 Bytes
/
docker-compose.yml
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
version: "3.9"
services:
app:
build: .
container_name: todo-app
network_mode: host
volumes:
- .:/todo
depends_on:
- postgres
- redis
command: ["scripts/start.sh", "python", "manage.py", "runserver"]
restart: unless-stopped
postgres:
image: postgres:alpine
container_name: todo-postgres
network_mode: host
volumes:
- db:/var/lib/postgresql/data
environment:
POSTGRES_DB: todo
POSTGRES_USER: todo
POSTGRES_PASSWORD: todo
restart: unless-stopped
redis:
image: redis:alpine
container_name: todo-redis
network_mode: host
restart: unless-stopped
command: ["redis-server", "--requirepass", "todo"]
nginx:
image: nginx:alpine
container_name: todo-nginx
network_mode: host
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
restart: unless-stopped
volumes:
db: null