-
Notifications
You must be signed in to change notification settings - Fork 16
/
docker-compose.yaml
73 lines (69 loc) · 1.63 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
62
63
64
65
66
67
68
69
70
71
72
73
version: "3.6"
services:
console:
build:
context: ./docker
dockerfile: cli.Dockerfile
args:
WWWUSER: "${WWWUSER:-1000}"
WWWGROUP: "${WWWGROUP:-1000}"
image: craft-8.1/cli
env_file: .env
environment:
XDEBUG_CONFIG: client_host=host.docker.internal
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_healthy
volumes:
- .:/app
command: php craft queue/listen
web:
build:
context: ./docker
dockerfile: web.Dockerfile
args:
WWWUSER: "${WWWUSER:-1000}"
WWWGROUP: "${WWWGROUP:-1000}"
image: craft-8.1/app
ports:
- "8080:8080"
- "5173:5173"
env_file: .env
environment:
XDEBUG_CONFIG: client_host=host.docker.internal
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_healthy
volumes:
- .:/app
mysql:
image: mysql:8.0.32
ports:
- ${FORWARDED_DB_PORT:-3306}:3306
environment:
MYSQL_ROOT_PASSWORD: "${CRAFT_DB_PASSWORD}"
MYSQL_ROOT_HOST: "%"
MYSQL_DATABASE: "${CRAFT_DB_DATABASE}"
MYSQL_USER: "${CRAFT_DB_USER}"
MYSQL_PASSWORD: "${CRAFT_DB_PASSWORD}"
MYSQL_ALLOW_EMPTY_PASSWORD: 1
volumes:
- "db_data:/var/lib/mysql"
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-p${CRAFT_DB_PASSWORD}"]
interval: 5s
redis:
image: redis:5-alpine
ports:
- "6379:6379"
healthcheck:
test: [ "CMD-SHELL", "redis-cli ping | grep PONG" ]
interval: 1s
timeout: 3s
retries: 5
volumes:
db_data: