-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
93 lines (87 loc) · 1.92 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
91
92
93
version: "3.8"
services:
app:
build:
dockerfile: ./docker/php/Dockerfile
target: app
args:
PHP_VERSION: "8.1"
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
- app
environment:
HOST_UID: "${HOST_UID}"
HOST_GID: "${HOST_GID}"
XDEBUG_CONFIG: "${APP_XDEBUG_CONFIG:-client_host=host.docker.internal}"
XDEBUG_MODE: "${APP_XDEBUG_MODE:-off}"
depends_on:
- database
- cache
- selenium
healthcheck:
interval: 2s
timeout: 2s
start_period: 10s
# retries: 5
webserver:
build:
dockerfile: ./docker/nginx/Dockerfile
extra_hosts:
- "host.docker.interal:host-gateway"
networks:
- app
environment:
SERVER_NAME: "${SERVER_NAME:-localhost}"
SERVER_PORT: "${SERVER_PORT:-80}"
APP_NAME: "app"
APP_PORT: 9000
WEB_ROOT: "/var/www/html/wordpress"
depends_on:
- app
database:
image: "mysql/mysql-server:8.0"
networks:
- app
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-p${DB_PASSWORD}"]
retries: 3
timeout: 5s
start_period: 5s
interval: 5s
environment:
MYSQL_ROOT_PASSWORD: "${DB_PASSWORD}"
MYSQL_ROOT_HOST: "%"
MYSQL_DATABASE: "${DB_NAME}"
MYSQL_USER: "${DB_USER}"
MYSQL_PASSWORD: "${DB_PASSWORD}"
volumes:
- "database.data:/var/lib/mysql"
cache:
image: "redis:alpine"
volumes:
- "cache.data:/data"
networks:
- app
healthcheck:
test: ["CMD", "redis-cli", "ping"]
retries: 3
timeout: 5s
start_period: 5s
interval: 5s
selenium:
image: "selenium/standalone-chrome"
networks:
- app
volumes:
- "/dev/shm:/dev/shm"
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
app:
driver: bridge
volumes:
database.data:
driver: local
cache.data:
driver: local