-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
52 lines (46 loc) · 974 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
44
45
46
47
48
49
50
51
52
version: '3.9'
services:
#uncomment this to run django container out of the box
web:
depends_on:
- postgres_db
build:
context: ./web
dockerfile: Dockerfile
image: django_k8s:v2
environment:
- PORT=8020
env_file:
- web/.env
ports:
- "80:8020"
command: sh -c "chmod +x migrate.sh && sh /app/migrate.sh && /app/entrypoint.sh"
# volumes:
# - staticfiles:/app/staticfiles/
postgres_db:
image: postgres
restart: always
command: -p 5434
env_file:
- web/.env
expose:
- 5434
ports:
- "5434:5434"
volumes:
- postgres_data:/var/lib/postgresql/data/
redis_db:
image: redis
restart: always
expose:
- 6388
ports:
- "6388:6388"
volumes:
- redis_data:/data
entrypoint: redis-server --appendonly yes --port 6380
volumes:
postgres_data:
redis_data:
staticfiles:
external: true