-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml.example
54 lines (45 loc) · 1.29 KB
/
docker-compose.yml.example
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
version: '3.5'
services:
sqldb:
image: postgres:12.3-alpine
restart: always
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
- POSTGRES_DB=sac_elections
- POSTGRES_USER=sac_elections
- POSTGRES_PASSWORD=devPass123 # change in prod
web:
build: .
restart: always
command: ../scripts/start.sh
volumes:
- .:/sac_elections_2020
- static_files:/sac_elections_2020/sac_elections/static
- media_files:/sac_elections_2020/sac_elections/media
environment:
- DJ_SECRET="72vy(4t(2s*@b7f-_mz%9y*%2i(+ei40uaraku!k_e1yup6keb"
ports:
- "8000:8000"
depends_on:
- sqldb
# im just gonna set the context, not sure which wordir build will use (dc.yaml or Dockerfile dir)
nginx:
build:
context: ./production/nginx
dockerfile: Dockerfile
volumes:
# os.path.join(BASE_DIR, 'static') is /sac_elections_2020/sac_elections/static
- static_files:/sac_elections_2020/sac_elections/static
- media_files:/sac_elections_2020/sac_elections/media
# change external port (if required) to avoid conflicts, on server change this to port 80
ports:
- "80:80"
depends_on:
- web
volumes:
postgres_data:
static_files:
media_files: