-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
docker-compose.yml
157 lines (156 loc) · 4.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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
version: "3.4"
services:
nginx:
image: nginx:stable
container_name: nginx
build:
context: .
dockerfile: compose/Dockerfile
volumes:
- ./compose/nginx:/etc/nginx/conf.d
depends_on:
- nodejs
ports:
- 80:80
db:
image: postgres:11.8
container_name: clinwiki-db
ports:
- 15432:5432
volumes:
- cw-data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=$POSTGRES_USER
- POSTGRES_PASSWORD=$POSTGRES_PASSWORD
- DATABASE_URL=$DATABASE_URL
elastic:
image: elasticsearch:6.8.8
container_name: elastic
ports:
- 9200:9200
environment:
- discovery.type=single-node
- http.port=9200
- http.cors.enabled=true
- http.cors.allow-origin=http://localhost:3030,http://127.0.0.1:3030,http://localhost:1358,http://127.0.0.1:1358,https://opensource.appbase.io
- http.cors.allow-headers=X-Requested-With,X-Auth-Token,Content-Type,Content-Length,Authorization
- http.cors.allow-credentials=true
- xpack.security.enabled=true
- ELASTIC_PASSWORD=$ELASTIC_PASSWORD
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- es-data:/usr/share/elasticsearch/data/
kibana:
image: docker.elastic.co/kibana/kibana:6.8.0
container_name: kibana
environment:
- ELASTICSEARCH_HOSTS=http://elastic:9200/
- ELASTICSEARCH_USERNAME=elastic
- ELASTICSEARCH_PASSWORD=$ELASTIC_PASSWORD
ports:
- 5601:5601
# redis:
# image: redis:5.0.5
# container_name: redis
# volumes:
# - redis-data:/data
# clinwiki:
# image: cwlite
# build:
# context: .
# dockerfile: compose/Dockerfile
# container_name: clinwiki
# ports:
# - 3000:3000
# volumes:
# - .:/clinwiki
# - ./compose/entrypoint.sh:/usr/bin/entrypoint.sh
# - node_modules:/clinwiki/front/node_modules
# env_file:
# - .env
# environment:
# - DATABASE_URL=postgres://$POSTGRES_USER:$POSTGRES_PASSWORD@db:5432
# - REDIS_URL=redis://redis:6379/0
# - SEARCHBOX_URL=http://elastic:$ELASTIC_PASSWORD@elastic:9200/
# depends_on:
# - db
# - elastic
# - redis
# sidekiq:
# image: cwlite
# build:
# context: .
# dockerfile: compose/Dockerfile
# container_name: sidekiq
# volumes:
# - .:/clinwiki
# env_file:
# - .env
# environment:
# - DATABASE_URL=postgres://$POSTGRES_USER:$POSTGRES_PASSWORD@db:5432
# - REDIS_URL=redis://redis:6379/0
# - SEARCHBOX_URL=http://elastic:$ELASTIC_PASSWORD@elastic:9200/
# depends_on:
# - db
# - elastic
# - redis
# command: bundle exec sidekiq -C config/sidekiq.yml
nodejs:
image: keymetrics/pm2:14-alpine
env_file:
- .env
build:
context: .
dockerfile: api/Dockerfile
command: npm start
container_name: nodejs
volumes:
- .:/api
ports:
- 8088:8088
environment:
- DATABASE_URL_NODE=$DATABASE_URL
- SEARCHBOX_URL_NODE=http://elastic:$ELASTIC_PASSWORD@elastic:9200/
depends_on:
- db
- elastic
data-pipeline:
image: keymetrics/pm2:14-alpine
env_file:
- .env
build:
context: .
dockerfile: api/Dockerfile
command: npm run pipeline-start
container_name: data-pipeline
volumes:
- .:/api
environment:
- DATABASE_URL_NODE=postgres://$POSTGRES_USER:$POSTGRES_PASSWORD@db:5432
- SEARCHBOX_URL_NODE=http://elastic:$ELASTIC_PASSWORD@elastic:9200/
depends_on:
- db
- elastic
graphql-engine:
image: hasura/graphql-engine:v2.0.0-alpha.10
container_name: hasura
ports:
- 5532:5532
depends_on:
- 'db'
environment:
HASURA_GRAPHQL_DATABASE_URL: 'postgres://$POSTGRES_USER:$POSTGRES_PASSWORD@db:5432'
HASURA_GRAPHQL_ENABLE_CONSOLE: 'true'
HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
HASURA_GRAPHQL_ADMIN_SECRET: nlYl98VbkFw9
HASURA_GRAPHQL_UNAUTHORIZED_ROLE: anonymous
HASURA_GRAPHQL_SERVER_PORT: 5532
HASURA_GRAPHQL_JWT_SECRET: '{"key":"aa3312a3dc6c430194e3cab28b163c6b","type":"HS256"}'
volumes:
es-data:
cw-data:
redis-data:
node_modules: