-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose_template.yml
61 lines (56 loc) · 1.5 KB
/
docker-compose_template.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
# Simple Python Template docker-compose config file
# Gets filled in by create_docker-compose_config.py
# nginx static server (forwards to Django for some things)
nginx:
build: ./nginx
links:
- django
ports:
- 8081:80
volumes:
- .:$dock_share
# django main website server
django:
build: .
expose:
- 8000
links:
- redis
- postgres
volumes:
- .:$dock_share
- $ann_dir:/opt/browser_data
working_dir: $dock_share/server
# redis memory cache/db
redis:
image: redis:latest
# postgres database
# Changing db_dir might break things
postgres:
image: postgres:9.4.5
environment:
PGDATA: $db_dir
POSTGRES_PASSWORD: '$db_pass'
POSTGRES_USER: $db_user
expose:
- $db_port
volumes:
- .:$dock_share
- $db_dir:$db_dir
# let's you play with db while other container runs
# (see db-related files in scripts/)
# Changing data_dir might break things
postgres-cmd:
command: exec sleep 1
image: postgres:9.4.5
environment:
PGDATABASE: $db_name
PGHOST: db # from the links part
PGPASSFILE: $dock_share/pg_pass_file
PGPORT: $db_port
PGUSER: $db_user
links:
- postgres:db
volumes:
- .:$dock_share
- $data_dir:$data_dir