-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
75 lines (72 loc) · 1.53 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
version: "3.4"
volumes:
pravham_pg_data: {}
services:
db:
image: postgres:13
restart: on-failure
environment:
POSTGRES_DB: pravaham
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "5432:5432"
volumes:
- pravham_pg_data:/var/lib/postgresql/data
redis:
# Unlike the official Redis image, Bitnami's version is simpler to set up using environment variables
image: bitnami/redis:latest
environment:
- ALLOW_EMPTY_PASSWORD=yes
ports:
- "6379:6379"
webapp:
build:
context: .
dockerfile: Dockerfile
depends_on:
- "redis"
- "db"
env_file:
- .env
environment:
DB_HOST: db
DB_NAME: pravaham
DB_USER: postgres
DB_PASS: postgres
REDIS_DSN: redis://redis:6379/1
DJANGO_SETTINGS_MODULE: pravaham.settings.base
STREAM_SERVER: http://localhost:8002/
ports:
- "8001:8001"
asyncapp:
build:
context: .
dockerfile: Dockerfile
depends_on:
- "redis"
- "db"
- "webapp"
env_file:
- .env
environment:
DB_HOST: db
DB_NAME: pravaham
DB_USER: postgres
DB_PASS: postgres
REDIS_DSN: redis://redis:6379/1
DJANGO_SETTINGS_MODULE: pravaham.settings.async_base
GUNICORN_WORKERS: 4
command:
- async
ports:
- "8002:8002"
revproxy:
container_name: revproxy
build: nginx_revproxy
depends_on:
- webapp
- asyncapp
restart: always
ports:
- 8000:80