-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
179 lines (164 loc) · 5.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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
version: '3.8'
services:
minica:
image: ghcr.io/bjornsnoen/minica-traefik-api:latest
volumes:
- ./certs:/app/certificates
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
DOCKER_HOST: "unix:///var/run/docker.sock"
DOCKER_LISTEN: "yes"
restart: unless-stopped
labels:
- traefik.http.routers.minica.rule=Host(`minica.localhost`)
- traefik.http.routers.minica.entrypoints=https
- traefik.http.routers.minica.tls=true
- traefik.http.services.minica.loadbalancer.server.port=80
traefik:
container_name: traefik
image: traefik:latest
restart: unless-stopped
networks:
default:
aliases:
- imagine-retailer-api.localhost
ports:
- "80:80"
- "443:443"
- "6379:6379"
- "4500:4500"
- "8080:8080"
- "5001:5001"
- "9099:9099"
- "9199:9199"
- "54321:54321"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./traefik.yml:/etc/traefik/traefik.yaml
- ./certs:/app/certificates
labels:
- traefik.http.routers.traefik-https.rule=Host(`traefik.dashboard.localhost`)
- traefik.http.routers.traefik-https.entrypoints=https
- traefik.http.routers.traefik-https.tls=true
- traefik.http.routers.traefik-http.service=api@internal
- traefik.http.routers.traefik-https.service=api@internal
# global redirect to https
- traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https
- traefik.http.routers.http-catchall.rule=hostregexp(`{host:.+}`)
- traefik.http.routers.http-catchall.entrypoints=http
- traefik.http.routers.http-catchall.middlewares=redirect-to-https
mariadb:
image: mariadb:10.7.4
ports:
- "3306:3306"
volumes:
- db:/var/lib/mysql
- ./etc/my.cnf:/etc/my.cnf
restart: unless-stopped
environment:
MYSQL_USER: root
MYSQL_ROOT_PASSWORD: root
mysqldb57:
platform: linux/x86_64
image: mysql:5.7
ports:
- "3307:3306"
volumes:
- db57:/var/lib/mysql
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: root
mysqldb8:
image: mysql:8.0
ports:
- "3308:3306"
volumes:
- db8:/var/lib/mysql
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: root
sqlserver:
image: mcr.microsoft.com/mssql/server:2019-latest
environment:
- ACCEPT_EULA=Y
- SA_PASSWORD=B+c.Ct02:7dx
- MSSQL_PID=Developer
ports:
- 1433:1433
volumes:
- sqlserver_data:/var/opt/mssql
restart: always
healthcheck:
test: [ "CMD-SHELL", "/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P B+c.Ct02:7dx -Q 'SELECT 1' || exit 1" ]
interval: 10s
retries: 10
start_period: 10s
timeout: 3s
sqlserver.configurator:
image: mcr.microsoft.com/mssql/server:2019-latest
volumes:
- ./init:/docker-entrypoint-initdb.d
depends_on:
sqlserver:
condition: service_healthy
command: >
bash -c '
/opt/mssql-tools/bin/sqlcmd -S sqlserver -U sa -P B+c.Ct02:7dx -d master -i docker-entrypoint-initdb.d/init.sql;
echo "All done!"';
mailhog:
image: mailhog/mailhog:latest
restart: unless-stopped
# PORT 1025 for SMTP
labels:
- traefik.http.routers.mailhog.rule=Host(`mailhog.localhost`)
- traefik.http.routers.mailhog.entrypoints=https
- traefik.http.routers.mailhog.tls=true
- traefik.http.services.mailhog.loadbalancer.server.port=8025
redis:
image: redis/redis-stack:latest
restart: unless-stopped
labels:
- traefik.tcp.routers.redis.rule=HostSNI(`*`)
- traefik.tcp.routers.redis.entryPoints=redis
- traefik.tcp.routers.redis.service=redis
- traefik.tcp.services.redis.loadbalancer.server.port=6379
- traefik.http.routers.redis-commander.rule=Host(`redis.localhost`)
- traefik.http.routers.redis-commander.entrypoints=https
- traefik.http.routers.redis-commander.tls=true
- traefik.http.services.redis-commander.loadbalancer.server.port=8001
minio:
image: minio/minio
restart: unless-stopped
volumes:
- ./storage/minio:/data
environment:
MINIO_ROOT_USER: minio
MINIO_ROOT_PASSWORD: minio123
MINIO_BROWSER_REDIRECT_URL: https://minio-console.localhost
labels:
# Setup rules for http connection for console
- traefik.http.routers.minio-console.service=minio-console
- traefik.http.routers.minio-console.rule=Host(`minio-console.localhost`)
- traefik.http.routers.minio-console.entrypoints=https
- traefik.http.routers.minio-console.tls=true
- traefik.http.services.minio-console.loadbalancer.server.port=9001
# Setup rules for https connection for api
- traefik.http.routers.minio.service=minio
- traefik.http.routers.minio.rule=Host(`minio.localhost`)
- traefik.http.routers.minio.entrypoints=https
- traefik.http.routers.minio.tls=true
- traefik.http.services.minio.loadbalancer.server.port=9000
command: server /data --console-address ":9001"
volumes:
db57:
external: true
db8:
external: true
db:
external: true
sqlserver_data:
external: true
networks:
default:
external: true
name: nginx-proxy