-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
190 lines (189 loc) · 6.07 KB
/
docker-compose.yaml
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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
name: gropius-production
services:
neo4j:
image: ghcr.io/graphglue/neo4j:main
restart: unless-stopped
volumes:
- neo4j-conf:/conf
- neo4j-data:/data
- neo4j-import:/import
- neo4j-logs:/logs
environment:
- NEO4J_server_memory_pagecache_size=1G
- NEO4J_server_memory_heap_initial__size=1G
- NEO4J_server_memory_heap_max__size=1G
- NEO4J_AUTH=neo4j/$GROPIUS_NEO4J_PASSWORD
- NEO4J_dbms_directories_run=/run
healthcheck:
test: wget -qO - http://localhost:7474 || exit 1
interval: 1s
timeout: 10s
retries: 20
start_period: 3s
api-public:
restart: unless-stopped
build:
context: ./gropius-backend
args:
module: api-public
depends_on:
neo4j:
condition: service_healthy
environment:
- SPRING_NEO4J_URI=bolt://neo4j:7687
- SPRING_NEO4J_AUTHENTICATION_USERNAME=neo4j
- SPRING_NEO4J_AUTHENTICATION_PASSWORD=$GROPIUS_NEO4J_PASSWORD
- GROPIUS_API_PUBLIC_JWT_PUBLIC_KEY=$GROPIUS_OAUTH_PUBLIC_KEY
- LOGGING_LEVEL_IO_GITHUB_GRAPHGLUE=WARN
- GRAPHGLUE_CORE_USE_NEO4J_PLUGIN=true
healthcheck:
test: wget -qO - http://localhost:8080/health || exit 1
interval: 1s
timeout: 10s
retries: 20
start_period: 3s
api-internal:
restart: unless-stopped
build:
context: ./gropius-backend
args:
module: api-internal
depends_on:
neo4j:
condition: service_healthy
environment:
- SPRING_NEO4J_URI=bolt://neo4j:7687
- SPRING_NEO4J_AUTHENTICATION_USERNAME=neo4j
- SPRING_NEO4J_AUTHENTICATION_PASSWORD=$GROPIUS_NEO4J_PASSWORD
- GROPIUS_API_INTERNAL_API_TOKEN=$GROPIUS_API_INTERNAL_TOKEN
- LOGGING_LEVEL_IO_GITHUB_GRAPHGLUE=WARN
- GROPIUS_CORE_CREATE_INDICES_ON_STARTUP=false
- GRAPHGLUE_CORE_USE_NEO4J_PLUGIN=true
healthcheck:
test: wget -qO - http://localhost:8080/health || exit 1
interval: 1s
timeout: 10s
retries: 20
start_period: 3s
postgres:
image: postgres:14
restart: unless-stopped
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=$GROPIUS_POSTGRES_PASSWORD
- POSTGRES_DB=gropius
login-service:
restart: unless-stopped
build:
context: ./gropius-login-service
command: /bin/sh -c "npx typeorm migration:run -d dist/migrationDataSource.config.js && sleep 10 && node dist/main.js"
depends_on:
api-internal:
condition: service_healthy
postgres:
condition: service_started
environment:
- GROPIUS_OAUTH_PUBLIC_KEY=$GROPIUS_OAUTH_PUBLIC_KEY
- GROPIUS_OAUTH_PRIVATE_KEY=$GROPIUS_OAUTH_PRIVATE_KEY
- GROPIUS_LOGIN_SPECIFIC_PUBLIC_KEY=$GROPIUS_LOGIN_SPECIFIC_PUBLIC_KEY
- GROPIUS_LOGIN_SPECIFIC_PRIVATE_KEY=$GROPIUS_LOGIN_SPECIFIC_PRIVATE_KEY
- GROPIUS_INTERNAL_BACKEND_ENDPOINT=http://api-internal:8080/graphql
- GROPIUS_INTERNAL_BACKEND_TOKEN=$GROPIUS_API_INTERNAL_TOKEN
- GROPIUS_ACCESS_TOKEN_EXPIRATION_TIME_MS=600000
- GROPIUS_LOGIN_DATABASE_HOST=postgres
- GROPIUS_LOGIN_DATABASE_PASSWORD=$GROPIUS_POSTGRES_PASSWORD
- GROPIUS_LOGIN_SYNC_API_SECRET=$GROPIUS_SYNC_API_SECRET
- GROPIUS_DEFAULT_STRATEGY_INSTANCE_TYPE=userpass
- GROPIUS_DEFAULT_STRATEGY_INSTANCE_CONFIG={}
- GROPIUS_DEFAULT_STRATEGY_INSTANCE_NAME=userpass-local
- GROPIUS_DEFAULT_USER_USERNAME=admin
- GROPIUS_DEFAULT_USER_DISPLAYNAME=System-Admin
- 'GROPIUS_DEFAULT_USER_POST_DATA={"password": "$GROPIUS_ADMIN_PASSWORD"}'
- GROPIUS_DEFAULT_USER_STRATEGY_INSTANCE_NAME=userpass-local
- GROPIUS_ENDPOINT=$GROPIUS_HOST
frontend:
restart: unless-stopped
build:
context: gropius-frontend
ports:
- "4200:80"
depends_on:
api-public:
condition: service_healthy
login-service:
condition: service_started
environment:
- API_PUBLIC_ENDPOINT=http://api-public:8080/graphql
- LOGIN_SERVICE_ENDPOINT=http://login-service:3000
mongo:
image: mongo
restart: unless-stopped
volumes:
- mongo-data:/data/db
- mongo-config:/data/configdb
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: $GROPIUS_MONGO_PASSWORD
sync-github:
build:
context: ./gropius-backend
args:
module: sync-github
depends_on:
- neo4j
- mongo
- login-service
environment:
- SPRING_NEO4J_URI=bolt://neo4j:7687
- SPRING_NEO4J_AUTHENTICATION_USERNAME=neo4j
- SPRING_NEO4J_AUTHENTICATION_PASSWORD=$GROPIUS_NEO4J_PASSWORD
- SPRING_DATA_MONGODB_HOST=mongo
- SPRING_DATA_MONGODB_PORT=27017
- SPRING_DATA_MONGODB_DATABASE=gropius
- SPRING_DATA_MONGODB_USERNAME=root
- SPRING_DATA_MONGODB_PASSWORD=$GROPIUS_MONGO_PASSWORD
- GROPIUS_SYNC_LOGIN_SERVICE_BASE=http://login-service:3000/
- GROPIUS_SYNC_API_SECRET=$GROPIUS_SYNC_API_SECRET
healthcheck:
test: wget -qO - http://localhost:8080/health || exit 1
interval: 1s
timeout: 10s
retries: 20
start_period: 3s
sync-jira:
build:
context: ./gropius-backend
args:
module: sync-jira
depends_on:
- neo4j
- mongo
- login-service
environment:
- SPRING_NEO4J_URI=bolt://neo4j:7687
- SPRING_NEO4J_AUTHENTICATION_USERNAME=neo4j
- SPRING_NEO4J_AUTHENTICATION_PASSWORD=$GROPIUS_NEO4J_PASSWORD
- SPRING_DATA_MONGODB_HOST=mongo
- SPRING_DATA_MONGODB_PORT=27017
- SPRING_DATA_MONGODB_DATABASE=gropius
- SPRING_DATA_MONGODB_USERNAME=root
- SPRING_DATA_MONGODB_PASSWORD=$GROPIUS_MONGO_PASSWORD
- GROPIUS_SYNC_LOGIN_SERVICE_BASE=http://login-service:3000/
- GROPIUS_SYNC_API_SECRET=$GROPIUS_SYNC_API_SECRET
healthcheck:
test: wget -qO - http://localhost:8080/health || exit 1
interval: 1s
timeout: 10s
retries: 20
start_period: 3s
volumes:
neo4j-conf:
neo4j-data:
neo4j-import:
neo4j-logs:
neo4j-plugins:
postgres-data:
mongo-data:
mongo-config: