forked from TechLabs-Berlin/trm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
147 lines (131 loc) · 6.3 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
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: .
dockerfile: functions/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: some-client@provider.com
OAUTH_CLIENT_SECRET: somesecret
GSUITE_DOMAIN: techlabs.org
GOOGLE_SERVICE_ACCOUNT_JSON: '{}'
GOOGLE_IMPERSONATE_SUBJECT: someuser@techlabs.org
fn-edyoucated:
build:
context: functions/edyoucated
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: some@user.invalid
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/gsheets
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==
data-generator:
build:
context: 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: