-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathcompose.yml
89 lines (84 loc) · 2.65 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
services:
# Build images for each container to allow for dependabot support, see: https://github.com/dependabot/dependabot-core/issues/390
database:
image: mariadb:latest
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", "healthcheck.sh", "--su-mysql", "--connect", "--innodb_initialized" ]
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}
XDEBUG_VERSION: '3.4.1'
env_file:
- ./docker/app/.env
volumes:
- '.:/var/www/html'
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'
- './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
database:
condition: service_healthy
mailpit:
condition: service_healthy
links:
- app
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'
volumes:
maildata:
networks:
default:
external: true
name: ${DOCKER_NETWORK_NAME:-boxuk-docker}