forked from zenstruck/foundry
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
61 lines (56 loc) · 1.74 KB
/
docker-compose.yaml
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
version: '3.9'
services:
php8.0: &php
container_name: foundry_php8.0
image: ghcr.io/zenstruck/foundry/php:8.0
depends_on:
mysql:
condition: service_healthy
mongo:
condition: service_healthy
volumes:
- .:/app
working_dir: /app
environment:
PHP_IDE_CONFIG: "serverName=FOUNDRY"
php8.1:
<<: *php
container_name: foundry_php8.1
image: ghcr.io/zenstruck/foundry/php:8.1
php8.2:
<<: *php
container_name: foundry_php8.2
image: ghcr.io/zenstruck/foundry/php:8.2
mysql:
container_name: foundry_mysql
image: mysql
command: --default-authentication-plugin=mysql_native_password
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: zenstruck_foundry
ports:
- ${MYSQL_PORT:-3306}:3306
healthcheck:
test: 'mysql -u root -proot -D zenstruck_foundry -e "SELECT 1"'
timeout: 120s
retries: 60
interval: 2s
mongo:
container_name: foundry_mongo
image: mongo:4.4
tmpfs:
- /data
environment:
- MONGO_INITDB_ROOT_USERNAME=admin
- MONGO_INITDB_ROOT_PASSWORD=admin
- MONGO_INITDB_DATABASE=mongo
- MONGO_NON_ROOT_USERNAME=mongo
- MONGO_NON_ROOT_PASSWORD=mongo
ports:
- ${MONGO_PORT:-27017}:27017
volumes:
- ./docker/mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongo mongo:27017/test --quiet
timeout: 10s
retries: 10