github.com/RichardKnop/Go-oauth2-server@v1.0.1/docker-etcd-config-entrypoint.sh (about) 1 #!/bin/sh 2 3 set -e 4 5 # to make sure etcd is ready (election ended and leader elected) 6 while ! etcdctl endpoint health &>/dev/null; do :; done 7 8 exec etcdctl put /config/go_oauth2_server.json '{ 9 "Database": { 10 "Type": "postgres", 11 "Host": "postgres", 12 "Port": 5432, 13 "User": "go_oauth2_server", 14 "Password": "", 15 "DatabaseName": "go_oauth2_server", 16 "MaxIdleConns": 5, 17 "MaxOpenConns": 5 18 }, 19 "Oauth": { 20 "AccessTokenLifetime": 3600, 21 "RefreshTokenLifetime": 1209600, 22 "AuthCodeLifetime": 3600 23 }, 24 "Session": { 25 "Secret": "test_secret", 26 "Path": "/", 27 "MaxAge": 604800, 28 "HTTPOnly": true 29 }, 30 "IsDevelopment": true 31 }'