-
Notifications
You must be signed in to change notification settings - Fork 10
/
docker-compose.yml
51 lines (47 loc) · 1.11 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
version: "3.9"
services:
db:
container_name: forge-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:
- "5432:5432"
nginx:
container_name: forge-nginx
image: forge/nginx:latest
build: ./nginx
restart: unless-stopped
volumes:
- static-data:/static
ports:
- "80:80"
depends_on:
- web
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
web:
container_name: forge-web
build: .
image: forge/website:latest
volumes:
- .:/code
- static-data:/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
depends_on:
- db
volumes:
database-data:
driver: local
static-data:
driver: local