-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
63 lines (60 loc) · 1.94 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
version: "3"
services:
###> doctrine/doctrine-bundle ###
database:
image: mysql:${MYSQL_VERSION:-8.0}
platform: linux/x86_64
restart: unless-stopped
environment:
MYSQL_DATABASE: ${MYSQL_DATABASE:-app}
MYSQL_PASSWORD: ${MYSQL_PASSWORD:-!ChangeMe!}
MYSQL_USER: ${MYSQL_USER:-app}
MYSQL_RANDOM_ROOT_PASSWORD: "yes"
cap_add:
- SYS_NICE # CAP_SYS_NICE
volumes:
- db-data:/var/lib/mysql:rw
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 3s
timeout: 3s
retries: 10
ports:
- 3306:3306
###< doctrine/doctrine-bundle ###
app:
build:
context: .
target: app_supervisor
depends_on:
- database
restart: unless-stopped
healthcheck:
interval: 10s
timeout: 3s
retries: 3
start_period: 30s
environment:
XDEBUG_MODE: "${XDEBUG_MODE:-off}"
DATABASE_URL: "${DATABASE_URL:-mysql://app:!ChangeMe!@database:3306/app?serverVersion=8.0&charset=utf8mb4}"
volumes:
- .:/srv/app
- caddy_data:/data
- caddy_config:/config
- ./docker/php/conf.d/app.dev.ini:/usr/local/etc/php/conf.d/app.dev.ini:ro
# If you develop on Mac or Windows you can remove the vendor/ directory
# from the bind-mount for better performance by enabling the next line:
#- /srv/app/vendor
ports:
- "80:80"
- "443:443"
- "443:443/udp"
extra_hosts:
# Ensure that host.docker.internal is correctly defined on Linux
- host.docker.internal:host-gateway
volumes:
caddy_data:
caddy_config:
###> doctrine/doctrine-bundle ###
db-data:
###< doctrine/doctrine-bundle ###