-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
145 lines (134 loc) · 3.23 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
version: '3'
services:
kong-database:
image: postgres:10
container_name: kong-database
restart: always
networks:
- kong
environment:
- POSTGRES_USER=kong
- POSTGRES_DB=kong
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
volumes:
- kong_data:/var/lib/postgresql/data
kong-migrations:
image: kong:latest
container_name: kong-migrations
restart: on-failure
networks:
- kong
environment:
- KONG_DATABASE=postgres
- KONG_PG_HOST=kong-database
- KONG_PG_PASSWORD=${POSTGRES_PASSWORD}
- KONG_CASSANDRA_CONTACT_POINTS=kong-database
command: kong migrations bootstrap
links:
- kong-database
depends_on:
- kong-database
kong:
image: kong:latest
container_name: kong
restart: always
networks:
- kong
environment:
- LC_CTYPE=en_US.UTF-8
- LC_ALL=en_US.UTF-8
- KONG_DATABASE=postgres
- KONG_PG_HOST=kong-database
- KONG_PG_USER=kong
- KONG_PG_PASSWORD=${POSTGRES_PASSWORD}
- KONG_CASSANDRA_CONTACT_POINTS=kong-database
- KONG_ADMIN_LISTEN=0.0.0.0:8001
- KONG_PROXY_LISTEN=0.0.0.0:80, 0.0.0.0:443 ssl http2
- KONG_STREAM_LISTEN=0.0.0.0:444
- KONG_PROXY_ACCESS_LOG=/dev/stdout
- KONG_ADMIN_ACCESS_LOG=/dev/stdout
- KONG_PROXY_ERROR_LOG=/dev/stderr
- KONG_ADMIN_ERROR_LOG=/dev/stderr
- KONG_LUA_SSL_TRUSTED_CERTIFICATE=/etc/ssl/certs/ca-certificates.crt
ports:
- "8000:8000"
- "8443:8443"
- "8001:8001"
- "8444:8444"
depends_on:
- kong-migrations
konga:
image: pantsel/konga:latest
restart: always
networks:
- kong
ports:
- "1337:1337"
container_name: konga
environment:
DB_ADAPTER: postgres
DB_HOST: kong-database
DB_USER: kong
DB_DATABASE: konga
DB_PASSWORD: ${POSTGRES_PASSWORD}
NODE_ENV: development # auto perform db migrations
depends_on:
- kong
- kong-database
volumes:
- konga_data:/app/kongadata
auth:
container_name: auth
build: .
restart: always
volumes:
- secrets:/var/run/secrets
ports:
- "8080:8000"
environment:
- MODE=production
- DB_URL=${MYSQL_USER}:${MYSQL_PASSWORD}@tcp(db_mysql:3306)/${MYSQL_DATABASE}?parseTime=true&loc=Asia%2FShanghai
- KONG_URL=http://kong:8001
- EMAIL_WHITELIST=${EMAIL_WHITELIST}
- EMAIL_SERVER_NO_REPLY_URL=${EMAIL_SERVER_NO_REPLY_URL}
- EMAIL_DOMAIN=${EMAIL_DOMAIN}
- REDIS_URL=${REDIS_URL}
- SITE_NAME=${SITE_NAME}
networks:
- kong
depends_on:
- kong
- kong-database
- db
- redis
db:
container_name: db_mysql
image: mysql
ports:
- "3306:3306"
volumes:
- data:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
restart: always
networks:
- kong
redis:
container_name: db_redis
image: redis:latest
volumes:
- redis:/data
restart: always
networks:
- kong
networks:
kong:
volumes:
secrets:
kong_data:
konga_data:
data:
redis: