-
Notifications
You must be signed in to change notification settings - Fork 7
/
docker-compose.yml
183 lines (162 loc) · 7.63 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
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
services:
postgres:
image: postgres:12
restart: always
volumes:
- db_data:/var/lib/postgresql/data
ports:
- "5432:5432"
environment:
POSTGRES_PASSWORD: postgrespassword
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
hasura:
build:
context: database
ports:
- "8080:8080" # API
- "9693:9693" # Migrations API
- "9695:9695" # Migrations Console
restart: always
environment:
HASURA_GRAPHQL_DATABASE_URL: postgres://postgres:postgrespassword@postgres:5432/postgres
HASURA_GRAPHQL_DEV_MODE: "false"
HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
# Set SKIP_MIGRATIONS to 1 if there are errors applying migrations & you want to debug
SKIP_MIGRATIONS: '0'
# HASURA_GRAPHQL_ADMIN_SECRET is a stub for development & test, it is not valid for any deployed environment
HASURA_GRAPHQL_ADMIN_SECRET: myadminsecretkey
# HASURA_GRAPHQL_JWT_SECRET is a stub for development & test, it is not valid for any deployed environment
# Regenerate with: node -e "console.log(require('crypto').randomBytes(256).toString('base64'));"
HASURA_GRAPHQL_JWT_SECRET: '{"type":"HS256","key":"I1J1ffr5N0wPftYwff12ZYtqpWAY1oEcmYxDbdfS7TnEt3a693gjTrXn94s0PmC+ap/S9roPY8gpWENGVNf7YxIjjhkUS+VaE7GvFmoTV5OgKTq0WZxu2hs5rOIoPXpWm6TXroZACZGc8U0BLawmzZclIb4nezyJsWPIUxP+YnQphikH//AMmMsxcDEyDGnyNdObW5SP4Pk+UuV7gKeweMNdoy1oI0M6sX2cWTdsd1BOwPteY3ef8cRaa0t2VPjGgJSiFeMbLzBaZB1m221/S3u1PhYqEBZXHVv7H+fqYjz2yaTPf12s0ohZolrtD6MzVnwFJmcX8QYSSTHr9QFmJA=="}'
# These functions are stubbed for development & test
FN_URL_EDYOUCATED: http://fn-edyoucated:4000
FN_URL_GSHEETS: http://fn-gsheets:4000
# These functions are not required for development & test
FN_URL_TYPEFORM: http://typeform.fn.invalid
FN_URL_FORM_RESPONSE: http://form-response.fn.invalid
volumes:
- ./database/migrations:/migrations
- ./database/metadata:/metadata
depends_on:
postgres:
condition: service_healthy
fn-auth:
condition: service_healthy
fn-edyoucated:
condition: service_healthy
fn-gsheets:
condition: service_healthy
frontend:
build:
context: frontend
dockerfile: Dockerfile.dev
environment:
BROWSER: none # prevents "react-scripts start" from opening a browser which does not work inside the container
stdin_open: true # prevents "react-scripts start" from exiting
ports:
- "3000:3000"
volumes:
# Uncomment the next line if you want live code reloading
# - ./frontend:/usr/src/app
- /usr/src/app/node_modules
depends_on:
hasura:
condition: service_healthy
fn-auth:
build:
context: functions
dockerfile: auth/Dockerfile
ports:
- "8000:8000"
environment:
# When NODE_ENV != production, function returns stubbed values
NODE_ENV: test
# Uncomment DEBUG to enable debug logging
# DEBUG: '1'
# JWT_KEY is a stub for development & test, it is not valid for any deployed environment
JWT_KEY: I1J1ffr5N0wPftYwff12ZYtqpWAY1oEcmYxDbdfS7TnEt3a693gjTrXn94s0PmC+ap/S9roPY8gpWENGVNf7YxIjjhkUS+VaE7GvFmoTV5OgKTq0WZxu2hs5rOIoPXpWm6TXroZACZGc8U0BLawmzZclIb4nezyJsWPIUxP+YnQphikH//AMmMsxcDEyDGnyNdObW5SP4Pk+UuV7gKeweMNdoy1oI0M6sX2cWTdsd1BOwPteY3ef8cRaa0t2VPjGgJSiFeMbLzBaZB1m221/S3u1PhYqEBZXHVv7H+fqYjz2yaTPf12s0ohZolrtD6MzVnwFJmcX8QYSSTHr9QFmJA==
# Points to the hasura service
GRAPHQL_URL: http://hasura:8080/v1/graphql
# Following variables are stubbed for development & test
OAUTH_CLIENT_ID: [email protected]
OAUTH_CLIENT_SECRET: somesecret
GSUITE_DOMAIN: techlabs.org
GOOGLE_SERVICE_ACCOUNT_JSON: '{}'
GOOGLE_IMPERSONATE_SUBJECT: [email protected]
fn-edyoucated:
build:
context: functions
dockerfile: edyoucated/Dockerfile
environment:
# When NODE_ENV != production, function returns stubbed values
NODE_ENV: test
# Uncomment DEBUG to enable debug logging
# DEBUG: '1'
# JWT_KEY is a stub for development & test, it is not valid for any deployed environment
JWT_KEY: I1J1ffr5N0wPftYwff12ZYtqpWAY1oEcmYxDbdfS7TnEt3a693gjTrXn94s0PmC+ap/S9roPY8gpWENGVNf7YxIjjhkUS+VaE7GvFmoTV5OgKTq0WZxu2hs5rOIoPXpWm6TXroZACZGc8U0BLawmzZclIb4nezyJsWPIUxP+YnQphikH//AMmMsxcDEyDGnyNdObW5SP4Pk+UuV7gKeweMNdoy1oI0M6sX2cWTdsd1BOwPteY3ef8cRaa0t2VPjGgJSiFeMbLzBaZB1m221/S3u1PhYqEBZXHVv7H+fqYjz2yaTPf12s0ohZolrtD6MzVnwFJmcX8QYSSTHr9QFmJA==
# EDYOUCATED_* variables are stubbed for development & test
EDYOUCATED_USERNAME: [email protected]
EDYOUCATED_PASSWORD: test123
EDYOUCATED_USER_POOL_ID: not-needed
EDYOUCATED_CLIENT_ID: no-client
EDYOUCATED_AWS_REGION: no-region
EDYOUCATED_API_URL: https://no-edyoucated.invalid
EDYOUCATED_ORGANIZATION_ID: an-id
fn-gsheets:
build:
context: functions
dockerfile: gsheets/Dockerfile
environment:
# When NODE_ENV != production, function returns stubbed values
NODE_ENV: test
# Uncomment DEBUG to enable debug logging
# DEBUG: '1'
# JWT_KEY is a stub for development & test, it is not valid for any deployed environment
JWT_KEY: I1J1ffr5N0wPftYwff12ZYtqpWAY1oEcmYxDbdfS7TnEt3a693gjTrXn94s0PmC+ap/S9roPY8gpWENGVNf7YxIjjhkUS+VaE7GvFmoTV5OgKTq0WZxu2hs5rOIoPXpWm6TXroZACZGc8U0BLawmzZclIb4nezyJsWPIUxP+YnQphikH//AMmMsxcDEyDGnyNdObW5SP4Pk+UuV7gKeweMNdoy1oI0M6sX2cWTdsd1BOwPteY3ef8cRaa0t2VPjGgJSiFeMbLzBaZB1m221/S3u1PhYqEBZXHVv7H+fqYjz2yaTPf12s0ohZolrtD6MzVnwFJmcX8QYSSTHr9QFmJA==
fn-certificate-generator:
build:
context: functions
dockerfile: certificate-generator/Dockerfile
ports:
- "8001:8080"
volumes:
- /usr/src/app/node_modules
- /usr/src/app/pkg/trm-api
# - ./lib/trm-api:/usr/src/app/pkg/trm-api
- ./functions/certificate-generator:/usr/src/app
environment:
# When NODE_ENV != production, function returns stubbed values
NODE_ENV: staging
PORT: '8080'
# Uncomment DEBUG to enable debug logging
# DEBUG: '1'
# JWT_KEY is a stub for development & test, it is not valid for any deployed environment
JWT_KEY: I1J1ffr5N0wPftYwff12ZYtqpWAY1oEcmYxDbdfS7TnEt3a693gjTrXn94s0PmC+ap/S9roPY8gpWENGVNf7YxIjjhkUS+VaE7GvFmoTV5OgKTq0WZxu2hs5rOIoPXpWm6TXroZACZGc8U0BLawmzZclIb4nezyJsWPIUxP+YnQphikH//AMmMsxcDEyDGnyNdObW5SP4Pk+UuV7gKeweMNdoy1oI0M6sX2cWTdsd1BOwPteY3ef8cRaa0t2VPjGgJSiFeMbLzBaZB1m221/S3u1PhYqEBZXHVv7H+fqYjz2yaTPf12s0ohZolrtD6MzVnwFJmcX8QYSSTHr9QFmJA==
# Points to the hasura service
GRAPHQL_URL: http://hasura:8080/v1/graphql
# Following variables are stubbed for development & test
GOTENBERG_URL: http://gotenberg:3000
depends_on:
gotenberg:
condition: service_healthy
gotenberg:
build:
context: pdf-generator
data-generator:
build:
context: functions/lib
dockerfile: data-generator/Dockerfile
environment:
# Uncomment DEBUG to enable debug logging
# DEBUG: '1'
# JWT_KEY is a stub for development & test, it is not valid for any deployed environment
JWT_KEY: I1J1ffr5N0wPftYwff12ZYtqpWAY1oEcmYxDbdfS7TnEt3a693gjTrXn94s0PmC+ap/S9roPY8gpWENGVNf7YxIjjhkUS+VaE7GvFmoTV5OgKTq0WZxu2hs5rOIoPXpWm6TXroZACZGc8U0BLawmzZclIb4nezyJsWPIUxP+YnQphikH//AMmMsxcDEyDGnyNdObW5SP4Pk+UuV7gKeweMNdoy1oI0M6sX2cWTdsd1BOwPteY3ef8cRaa0t2VPjGgJSiFeMbLzBaZB1m221/S3u1PhYqEBZXHVv7H+fqYjz2yaTPf12s0ohZolrtD6MzVnwFJmcX8QYSSTHr9QFmJA==
# Points to the hasura service
GRAPHQL_URL: http://hasura:8080/v1/graphql
restart: never
volumes:
db_data: