forked from RichardKnop/example-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-etcd-config-entrypoint.sh
executable file
·50 lines (47 loc) · 1.25 KB
/
docker-etcd-config-entrypoint.sh
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
#!/bin/sh
set -e
# to make sure etcd is ready (election ended and leader elected)
while ! etcdctl endpoint health &>/dev/null; do :; done
exec etcdctl put /config/example_api.json '{
"Database": {
"Type": "postgres",
"Host": "postgres",
"Port": 5432,
"User": "example_api",
"Password": "",
"DatabaseName": "example_api",
"MaxIdleConns": 5,
"MaxOpenConns": 5
},
"Oauth": {
"AccessTokenLifetime": 3600,
"RefreshTokenLifetime": 1209600,
"AuthCodeLifetime": 3600
},
"Facebook": {
"AppID": "facebook_app_id",
"AppSecret": "facebook_app_secret"
},
"Mailgun": {
"Domain": "example.com",
"APIKey": "mailgun_api_key",
"PublicAPIKey": "mailgun_public_api_key"
},
"Web": {
"Scheme": "http",
"Host": "localhost:8080",
"AppScheme": "http",
"AppHost": "localhost:8000"
},
"AppSpecific": {
"ConfirmationLifetime": 604800,
"InvitationLifetime": 604800,
"PasswordResetLifetime": 604800,
"CompanyName": "Example Ltd",
"CompanyNoreplyEmail": "[email protected]",
"ConfirmationURLFormat": "%s://%s/confirm-email/%s",
"InvitationURLFormat": "%s://%s/confirm-invitation/%s",
"PasswordResetURLFormat": "%s://%s/reset-password/%s"
},
"IsDevelopment": true
}'