-
-
Notifications
You must be signed in to change notification settings - Fork 490
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
110 lines (110 loc) · 3.45 KB
/
docker-compose.yml
File metadata and controls
110 lines (110 loc) · 3.45 KB
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
services:
test:
build:
context: .
args:
PHP_VERSION: ${PHP_VERSION:-8.4}
XDEBUG_ENABLED: ${XDEBUG_ENABLED:-false}
depends_on:
mysql:
condition: service_healthy
mysql2:
condition: service_healthy
postgres:
condition: service_healthy
redis:
condition: service_healthy
mssql:
condition: service_healthy
memcached:
condition: service_healthy
dynamodb:
condition: service_healthy
volumes:
- .:${PROJECT_PATH:-$PWD}:cached
working_dir: ${PROJECT_PATH:-$PWD}
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
extra_hosts:
- "host.docker.internal:host-gateway"
stdin_open: true
tty: true
mysql:
image: mysql:8
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
tmpfs:
- /var/lib/mysql
mysql2:
image: mysql:8
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
tmpfs:
- /var/lib/mysql
postgres:
image: postgres:16
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
tmpfs:
- /var/lib/postgresql/data
mssql:
image: mcr.microsoft.com/mssql/server:2022-latest
environment:
- ACCEPT_EULA=Y
- SA_PASSWORD=P@ssword # must be the same as TENANCY_TEST_SQLSRV_PASSWORD
healthcheck: # https://github.com/Microsoft/mssql-docker/issues/133#issuecomment-1995615432
test: timeout 2 bash -c 'cat < /dev/null > /dev/tcp/127.0.0.1/1433'
interval: 10s
timeout: 10s
retries: 10
redis:
image: redis:alpine
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 1s
timeout: 3s
retries: 20
memcached:
image: memcached:alpine
healthcheck:
test: ["CMD-SHELL", "echo version | nc localhost 11211 | grep -q VERSION"]
interval: 1s
timeout: 3s
retries: 20
dynamodb:
image: amazon/dynamodb-local:latest
healthcheck:
test: ["CMD-SHELL", "cat < /dev/null > /dev/tcp/127.0.0.1/8000"]
interval: 1s
timeout: 3s
retries: 20