-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
123 lines (120 loc) · 2.82 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
version: '2'
services:
postgres:
container_name: ims-postgres
image: centos/postgresql-95-centos7
environment:
- POSTGRESQL_USER=www
- POSTGRESQL_PASSWORD=ebisc
- POSTGRESQL_DATABASE=ebisc
- POSTGRESQL_ADMIN_PASSWORD=ebisc
cap_drop:
- ALL
nginx:
container_name: ims-nginx
build:
context: .
dockerfile: Dockerfile-nginx
args:
- PORT=8080
volumes:
- $PWD/var/static:/var/static
- $PWD/var/media:/var/media
depends_on:
- uwsgi
ports:
- "8080:8080"
cap_drop:
- ALL
nginx-8008:
container_name: ims-nginx-8008
build:
context: .
dockerfile: Dockerfile-nginx
args:
- PORT=8008
volumes:
- $PWD/var/static:/var/static
- $PWD/var/media:/var/media
depends_on:
- uwsgi
ports:
- "8008:8008"
cap_drop:
- ALL
django:
build:
context: .
dockerfile: Dockerfile-uwsgi
args:
- ROLE=develop
- http_proxy=${http_proxy}
- https_proxy=${https_proxy}
- no_proxy=${no_proxy}
environment:
- DB_USER=www
- DB_PASS=ebisc
- DB_HOST=ims-postgres
- DB_NAME=ebisc
- ES_HOST=ims-elasticsearch
# The secret is "@!7ju$b1*1c5!dihak)cw3ao1ema&2quw3s*9l#&8^v8ob%gw1". On the following line the dollar $ is escaped:
- SECRET_KEY=@!7ju$$b1*1c5!dihak)cw3ao1ema&2quw3s*9l#&8^v8ob%gw1
- HPSCREG_PASSWORD=cWNJnc6p
- HPSCREG_USER=ebiscims
- LIMS_PASSWORD=ebisc321
- LIMS_USER=ebisc
- BIOSAMPLE_KEY=WNTGPBNW0NGC3876
cap_drop:
- ALL
volumes:
- $PWD/var/static:/app/var/static
- $PWD/var/media:/app/var/media
uwsgi:
extends:
service: django
container_name: ims-uwsgi
ports:
- "9191:9191"
command: ["run-uwsgi"]
read_only: true
tmpfs: /tmp
depends_on:
- postgres
- elasticsearch
deploy:
extends:
service: django
command: ["run-deploy"]
update:
extends:
service: django
read_only: true
tmpfs: /tmp
command: ["run-ims-update"]
hpscreg-local:
extends:
service: django
command: ["/app/manage.py", "import", "hpscreg-local", "--traceback"]
environment:
- TOMCAT_URL=${tomcat_url}
elasticsearch:
container_name: ims-elasticsearch
image: elasticsearch:1.6.2
db_dump:
extends: postgres
environment:
- PGPASSWORD=ebisc
- PGHOST=ims-postgres
- PGUSER=www
volumes:
- $PWD:/tmp
command: "sh -c 'pg_dump -d ebisc | gzip -c > /tmp/ebisc.sql.gz'"
db_import:
extends: postgres
environment:
- PGPASSWORD=ebisc
- PGHOST=ims-postgres
- PGUSER=postgres
volumes:
- $PWD:/tmp
command: "sh -c 'dropdb ebisc; createdb ebisc && gunzip -c /tmp/ebisc.sql.gz | psql -d ebisc -f -'"