-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
52 lines (48 loc) · 1.04 KB
/
docker-compose.yaml
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
services:
auctions:
container_name: auctions_django
build: .
command: >
sh -c "python3 manage.py wait_for_db &&
python3 manage.py migrate &&
python3 manage.py runserver 0.0.0.0:8001"
restart: always
ports:
- "8001:8001"
volumes:
- ./:/auctions
env_file:
- .env
depends_on:
- auctions_postgres
- auctions_redis
networks:
- micro-network
- auctions-private-network
auctions_postgres:
container_name: auctions_postgres
image: postgres:16
restart: always
volumes:
- postgres_auctions_data:/var/lib/postgresql/data/
env_file:
- .env
ports:
- "5433:5432"
networks:
- auctions-private-network
auctions_redis:
container_name: auctions_redis
image: redis:alpine
restart: always
ports:
- "6380:6380"
networks:
- auctions-private-network
volumes:
postgres_auctions_data:
networks:
micro-network:
external: true
auctions-private-network:
external: false