-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
85 lines (78 loc) · 1.82 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
version: '3.8'
services:
mssql:
image: mcr.microsoft.com/mssql/server:2019-latest
environment:
SA_PASSWORD: "${MSSQL_SA_PASSWORD}"
ACCEPT_EULA: "Y"
ports:
- "1433:1433"
volumes:
- mssql-data:/var/opt/mssql
- ./mssql/init:/init
networks:
- db-network
restart: unless-stopped
mysql:
image: mysql:8.0
environment:
MYSQL_ROOT_PASSWORD: "${MYSQL_ROOT_PASSWORD}"
MYSQL_DATABASE: todo_db
MYSQL_USER: admin
MYSQL_PASSWORD: "${MYSQL_USER_PASSWORD}"
ports:
- "3306:3306"
volumes:
- mysql-data:/var/lib/mysql
- ./mysql/init:/docker-entrypoint-initdb.d
networks:
- db-network
restart: unless-stopped
postgres:
image: postgres:16
environment:
POSTGRES_USER: admin
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
POSTGRES_DB: todo_db
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
- ./postgres/init:/docker-entrypoint-initdb.d
networks:
- db-network
restart: unless-stopped
mongodb:
image: mongo:6.0
environment:
MONGO_INITDB_ROOT_USERNAME: admin
MONGO_INITDB_ROOT_PASSWORD: "${MONGODB_ROOT_PASSWORD}"
MONGO_INITDB_DATABASE: todo_db
ports:
- "27017:27017"
volumes:
- mongodb-data:/data/db
- ./mongodb/init:/docker-entrypoint-initdb.d
networks:
- db-network
restart: unless-stopped
redis:
image: redis:7.0
command: ["redis-server", "--requirepass", "${REDIS_PASSWORD}"]
ports:
- "6379:6379"
volumes:
- redis-data:/data
- ./redis/init:/docker-entrypoint-initdb.d
networks:
- db-network
restart: unless-stopped
networks:
db-network:
driver: bridge
volumes:
mssql-data:
mysql-data:
postgres-data:
mongodb-data:
redis-data: