forked from rafaelrodrigues3092/docker-mssql-alwayson
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
62 lines (57 loc) · 1.53 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
version: "3.9"
x-service-environment: &common-variables
HADR_PORT: 5022
INIT_WAIT: 40
ACCEPT_EULA: 'Y'
IS_AOAG_PRIMARY: False
SA_PASSWORD: ${SA_PASSWORD}
MASTER_KEY_PASSWORD: ${MASTER_KEY_PASSWORD}
HADR_LOGIN_PASSWORD: ${HADR_LOGIN_PASSWORD}
HADR_CERT_PASSWORD: ${HADR_CERT_PASSWORD}
SHARED_PATH: ${SHARED_PATH}
BACKUP_PATH: ${BACKUP_PATH}
services:
db1:
container_name: db1
hostname: db1
build:
context: .\sql
args:
- INSTALL_TOOLS=${INSTALL_TOOLS}
environment:
<<: *common-variables
IS_AOAG_PRIMARY: True
TCP_PORT: ${DB1_TCP_PORT}
PARTNER_HOSTNAME: db2
ports:
- ${DB1_TCP_PORT}:${DB1_TCP_PORT}
volumes:
- mssql-server-shared:${SHARED_PATH}
- mssql-server-backup:${BACKUP_PATH}
networks:
- sqlaoag
db2:
container_name: db2
hostname: db2
build:
context: .\sql
args:
- INSTALL_TOOLS=${INSTALL_TOOLS}
environment:
<<: *common-variables
INIT_WAIT: 60
TCP_PORT: ${DB2_TCP_PORT}
ports:
- ${DB2_TCP_PORT}:${DB2_TCP_PORT}
volumes:
- mssql-server-shared:${SHARED_PATH}
- mssql-server-backup:${BACKUP_PATH}
depends_on:
- db1
networks:
- sqlaoag
volumes:
mssql-server-shared:
mssql-server-backup:
networks:
sqlaoag: