-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
101 lines (95 loc) · 2.05 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
version: "3.4"
volumes:
db-data:
name: controlled-vocabulary-designer-db-data
services:
# NGINX(PROXY)_CONTAINER
gw:
container_name: gw
build:
context: .
dockerfile: ./gw/Dockerfile
ports:
- 10081:10081
volumes:
- "./gw/conf.d:/etc/nginx/conf.d:ro"
links:
- app
- api
depends_on:
- app
- api
restart: always
# FRONTEND_CONTAINER
app:
container_name: app
build:
context: .
dockerfile: ./app/Dockerfile
args:
- SPROXY=${HTTPS_PROXY}
environment:
- http_proxy=${HTTP_PROXY}
- https_proxy=${HTTPS_PROXY}
- HTTP_PROXY=${HTTP_PROXY}
- HTTPS_PROXY=${HTTPS_PROXY}
ulimits:
nofile:
soft: 4096
hard: 4096
volumes:
- /usr/src/app
tty: true
command: sh -c "npm start && tail -f /dev/null"
depends_on:
- api
restart: always
# BACKEND_CONTAINER
api:
container_name: api
build:
context: .
dockerfile: ./api/Dockerfile
args:
- PROXY=${HTTP_PROXY}
- SPROXY=${HTTPS_PROXY}
environment:
- http_proxy=
- https_proxy=
- HTTP_PROXY=
- HTTPS_PROXY=
tty: true
volumes:
- ./db/work:/tmp/work
depends_on:
- db
restart: always
# DB(PostgreSQL)
db:
container_name: db
build:
context: .
dockerfile: ./db/Dockerfile
restart: always
volumes:
- db-data:/var/lib/postgresql/data
- ./db/work:/tmp/work
environment:
- POSTGRES_USER=commonvocabulary
- POSTGRES_PASSWORD=commonvocabulary
- POSTGRES_DB=commonvocabulary
healthcheck:
test: ["CMD", "pg_isready", "-U", "commonvocabulary", "-d", "commonvocabulary"]
interval: 10s
timeout: 5s
retries: 100
restart: always
# DBAPI(PostgREST)
dbrest:
image: postgrest/postgrest
container_name: dbrest
environment:
PGRST_DB_URI: "postgres://commonvocabulary:commonvocabulary@db:5432"
PGRST_DB_SCHEMA: "public"
PGRST_DB_ANON_ROLE: "commonvocabulary"
restart: always