forked from archtechx/tenancy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
77 lines (77 loc) · 2.27 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
version: '2.4'
services:
test:
build:
context: .
args:
PHP_VERSION: ${PHP_VERSION:-8.1}
depends_on:
mysql:
condition: service_healthy
postgres:
condition: service_healthy
redis:
condition: service_healthy
volumes:
- .:/var/www/html:delegated
environment:
DOCKER: 1
DB_PASSWORD: password
DB_USERNAME: root
DB_DATABASE: main
TENANCY_TEST_REDIS_HOST: redis
TENANCY_TEST_MYSQL_HOST: mysql
TENANCY_TEST_PGSQL_HOST: postgres
TENANCY_TEST_SQLSRV_HOST: mssql
TENANCY_TEST_SQLSRV_USERNAME: sa
TENANCY_TEST_SQLSRV_PASSWORD: P@ssword
stdin_open: true
tty: true
mysql:
image: mysql:5.7
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: main
MYSQL_USER: user # redundant
MYSQL_PASSWORD: password
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
timeout: 10s
retries: 10
mysql2:
image: mysql:5.7
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: main
MYSQL_USER: user # redundant
MYSQL_PASSWORD: password
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
timeout: 10s
retries: 10
postgres:
image: postgres:11
environment:
POSTGRES_PASSWORD: password
POSTGRES_USER: root # superuser name
POSTGRES_DB: main
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:alpine
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 1s
timeout: 3s
retries: 30
mssql:
image: mcr.microsoft.com/mssql/server:2019-latest
ports:
- 1433:1433
environment:
- ACCEPT_EULA=Y
- SA_PASSWORD=P@ssword # todo reuse values from env above
# todo missing health check