generated from yiisoft/package-template
-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
90 lines (90 loc) · 2.11 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
services:
php:
build: .
volumes:
- ./src:/code/src
- ./tests:/code/tests
- ./phpunit.xml.dist:/code/phpunit.xml.dist
command: tail -F anything
depends_on:
mysql:
condition: service_healthy
postgres:
condition: service_healthy
mssql:
condition: service_healthy
oracle:
condition: service_healthy
mysql:
image: mysql:9
ports:
- "3306:3306"
volumes:
- type: tmpfs
target: /var/lib/mysql
environment:
MYSQL_DATABASE: yii
MYSQL_ROOT_PASSWORD: root
MYSQL_ROOT_HOST: "%"
healthcheck:
test: [ "CMD", "mysqladmin" ,"ping", "-h", "localhost", "-uroot" ]
interval: 5s
timeout: 5s
retries: 20
postgres:
image: postgres:17
ports:
- "5432:5432"
volumes:
- type: tmpfs
target: /var/lib/postgresql/data
environment:
POSTGRES_DB: yii
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 5s
timeout: 5s
retries: 5
mssql:
image: mcr.microsoft.com/mssql/server:2022-latest
environment:
SA_PASSWORD: YourStrong!Passw0rd
ACCEPT_EULA: Y
ports:
- "1433:1433"
user: root
volumes:
- mssql-data:/var/opt/mssql/data
- mssql-log:/var/opt/mssql/log
- mssql-secrets:/var/opt/mssql/secrets
healthcheck:
test: /opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P "$${SA_PASSWORD}" -Q "SELECT 1" -b -C -o /dev/null
interval: 10s
timeout: 3s
retries: 100
start_period: 10s
oracle:
build:
context: docker/oracle
ports:
- "1521:1521"
volumes:
- oracle-data:/opt/oracle/oradata
environment:
ORACLE_PASSWORD: sys_user_password
APP_USER: my_user
APP_USER_PASSWORD: password_i_should_change
healthcheck:
test: ["CMD", "healthcheck.sh"]
interval: 10s
timeout: 5s
retries: 100
start_period: 5s
start_interval: 5s
volumes:
mssql-data:
mssql-log:
mssql-secrets:
oracle-data: