-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
65 lines (60 loc) · 1.52 KB
/
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
53
54
55
56
57
58
59
60
61
62
63
64
65
version: "3.9"
services:
db:
container_name: channels-db
image: postgres:13
environment:
- POSTGRES_DB=forge_devel
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=password
volumes:
- database-data:/var/lib/postgresql/data # persist data even if container shuts down
ports:
- "5433:5432"
redis:
container_name: channels-redis
image: "redis:alpine"
restart: unless-stopped
ports:
- "6379:6379"
nginx:
container_name: channels-nginx
image: channels/nginx:latest
build: ./nginx
restart: unless-stopped
volumes:
- ./static:/static
ports:
- "9000:80"
depends_on:
- web
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
web:
container_name: channels-web
build: .
image: channels/website:latest
volumes:
- .:/code
- ./static:/code/static
environment:
- SECRET_KEY=set_in_prod
- DEBUG=True
- ALLOWED_HOSTS=*
- POSTGRES_DB=forge_devel
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=password
- POSTGRES_HOST=db
- POSTGRES_PORT=5432
- REDIS_URL=redis
- REDIS_PORT=6379
- CHAT_SITE_URL=localhost
- CHAT_SITE_PORT=9000
- CHAT_SITE_HTTPS=False
- MAIN_SITE_URL=localhost
- MAIN_SITE_PORT=8000
depends_on:
- db
- redis
volumes:
database-data:
driver: local