-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
165 lines (155 loc) · 3.67 KB
/
docker-compose.yaml
File metadata and controls
165 lines (155 loc) · 3.67 KB
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
version: "3.7"
services:
#client:
# build: ./client
# ports:
# - "8082:3000"
# mongo:
# image: mongo
# ports:
# - 27017:27017
# mongo-express:
# image: mongo-express
# environment:
# ME_CONFIG_MONGODB_PORT: 27017
# restart: always
# ports:
# - 8081:8081
# depends_on:
# - mongo
pgAdmin:
image: dpage/pgadmin4
container_name: pgAdmin
hostname: pgAdmin
environment:
PGADMIN_DEFAULT_EMAIL: admin@admin.com
PGADMIN_DEFAULT_PASSWORD: admin
ports:
- 3001:80
restart: always
loki:
image: grafana/loki:master
container_name: loki
hostname: loki
restart: unless-stopped
ports:
- 3100:3100
fluentd:
image: grafana/fluent-plugin-loki
container_name: fluentd
hostname: fluentd
command:
- "fluentd"
- "-v"
- "-p"
- "/fluentd/plugins"
volumes:
- ./fluentd/fluentd_logs:/fluentd/log
- ./fluentd/fluent.conf:/fluentd/etc/fluent.conf
environment:
LOKI_URL: http://loki:3100
LOKI_USERNAME:
LOKI_PASSWORD:
restart: always
ports:
- 24224:24224
- 24224:24224/udp
grafana:
image: grafana/grafana
container_name: grafana
hostname: grafana
restart: always
ports:
- 3000:3000
keycloak:
image: jboss/keycloak:4.8.3.Final
container_name: keycloak
hostname: keycloak
environment:
- KEYCLOAK_USER=admin
- KEYCLOAK_PASSWORD=admin
ports:
- 8989:8080
restart: always
common_tenant:
image: postgres
container_name: common_tenant
hostname: common_tenant
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: common_tenant
volumes:
- ./initCommon.sql:/docker-entrypoint-initdb.d/init.sql
restart: always
ports:
- 5432:5432
tenant1:
image: postgres
container_name: tenant1
hostname: tenant1
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: tenant1
volumes:
- ./initTenant1.sql:/docker-entrypoint-initdb.d/init.sql
restart: always
ports:
- 5433:5432
tenant2:
image: postgres
container_name: tenant2
hostname: tenant2
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: tenant2
volumes:
- ./initTenant2.sql:/docker-entrypoint-initdb.d/init.sql
restart: always
ports:
- 5434:5432
tenant3:
image: mcr.microsoft.com/mssql/server
container_name: tenant3
hostname: tenant3
environment:
SA_PASSWORD: saPower_123
ACCEPT_EULA: Y
volumes:
- ./initTenant3.sql:/scripts/init.sql
restart: always
ports:
- 1433:1433
command:
- /bin/bash
- -c
- |
# Launch MSSQL and send to background
/opt/mssql/bin/sqlservr &
# Wait 30 seconds for it to be available
# (lame, I know, but there's no nc available to start prodding network ports)
sleep 100
# Run every script in /scripts
/opt/mssql-tools/bin/sqlcmd -U sa -P saPower_123 -l 30 -e -i /scripts/init.sql
# So that the container doesn't shut down, sleep this thread
sleep infinity
# server:
# build: ./server
# container_name: server
# hostname: server
# environment:
# - PORT=5000
# - NODE_ENV=production
#- MONGO_SERVER=mongo
# - TENANT_CLIENT=pg
# - TENANT_USER=postgres
# - TENANT_PORT=5432
# - TENANT_HOST=common_tenant
# - TENANT_DATABASE=common_tenant
# - TENANT_PASSWORD=postgres
# ports:
# - "5000:5000"
# depends_on:
# - common_tenant