-
Notifications
You must be signed in to change notification settings - Fork 4
/
compose.yml
134 lines (126 loc) · 3.67 KB
/
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
services:
# Build images for each container to allow for dependabot support, see: https://github.com/dependabot/dependabot-core/issues/390
database:
build: docker/database
environment:
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD:-password}
MYSQL_DATABASE: ${DB_NAME:-project}
MYSQL_USER: ${DB_USER:-dbuser}
MYSQL_PASSWORD: ${DB_PASSWORD:-password}
ports:
- '127.0.0.1:3307:3306' # always bind to 127.0.0.1 or 192.168.34.1 etc. Never bind to 0.0.0.0 unless you know what you are doing
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 10s
timeout: 5s
retries: 3
app:
build:
context: docker/app
dockerfile: php${PHP_VERSION:-8.2}/Dockerfile
args:
USER_ID: ${USER_ID:-0}
GROUP_ID: ${GROUP_ID:-0}
env_file:
- ./docker/app/.env
volumes:
- '.:/var/www/html:cached'
extra_hosts:
- host.docker.internal:host-gateway
- '${LOOPBACK_HOST_NAME}:192.168.35.10' # IP should match the IP address set for nginx below
healthcheck:
test: ["CMD", "php", "-v"]
interval: 10s
timeout: 5s
retries: 3
app_xdebug:
build:
context: docker/app
dockerfile: php${PHP_VERSION:-8.2}/Dockerfile
args:
USER_ID: ${USER_ID:-0}
GROUP_ID: ${GROUP_ID:-0}
INSTALL_XDEBUG: 'true'
XDEBUG_VERSION: '3.2.2'
env_file:
- ./docker/app/.env
volumes:
- '.:/var/www/html:cached'
extra_hosts:
- host.docker.internal:host-gateway
- '${LOOPBACK_HOST_NAME}:192.168.35.10' # IP should match the IP address set for nginx below
healthcheck:
test: ["CMD", "php", "-v"]
interval: 10s
timeout: 5s
retries: 3
nginx:
build: docker/nginx
volumes:
- '.:/var/www/html:cached'
- './docker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf'
- './docker/nginx/conf:/etc/nginx/conf.d/conf'
- './docker/nginx/insecure_https.crt:/etc/pki/tls/certs/insecure_https.crt:delegated'
- './docker/nginx/insecure_https.key:/etc/pki/tls/private/insecure_https.key:delegated'
ports:
- '127.0.0.1:80:80' # always bind to 127.0.0.1 or 192.168.34.1 etc. Never bind to 0.0.0.0 unless you know what you are doing
- '127.0.0.1:443:443' # always bind to 127.0.0.1 or 192.168.34.1 etc. Never bind to 0.0.0.0 unless you know what you are doing
depends_on:
app:
condition: service_healthy
app_xdebug:
condition: service_healthy
database:
condition: service_healthy
mailpit:
condition: service_healthy
memcached:
condition: service_healthy
links:
- app
- app_xdebug
networks:
default:
aliases:
- ${PROJECT_NAME}.local
mailpit:
build: docker/mailpit
volumes:
- maildata:/data
ports:
- 8025:8025
- 1025:1025
environment:
MP_MAX_MESSAGES: 5000
MP_DATABASE: /data/mailpit.db
MP_SMTP_AUTH_ACCEPT_ANY: 1
MP_SMTP_AUTH_ALLOW_INSECURE: 1
nodejs:
build: docker/node
working_dir: /usr/src/app
volumes:
- '.:/usr/src/app:cached'
- './node_modules:/usr/src/app/node_modules:delegated'
memcached:
build: docker/memcached
healthcheck:
test: ["CMD", "echo", "stats", "|", "nc", "localhost", "11211"]
interval: 10s
timeout: 5s
retries: 3
blackfire:
build: docker/blackfire
env_file:
- docker/blackfire/.env
ports:
- '127.0.0.1:8707:8707'
profiles:
- profiling
volumes:
vr_yarn_cache:
vr_node_modules:
maildata:
networks:
default:
external: true
name: ${DOCKER_NETWORK_NAME:-boxuk-docker}