-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
111 lines (107 loc) · 4.13 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
111 lines (107 loc) · 4.13 KB
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
services:
traefik:
ports:
- "80:80"
- "443:443"
# - "8080:8080" # Uncomment to enable Traefik's dashboard
networks:
development:
aliases:
- ${APP_DOMAIN:-benchkit.dev.test}
- ${VITE_DOMAIN:-vite.dev.test}
- ${MAILPIT_DOMAIN:-mailpit.dev.test}
- reverb.dev.test
volumes:
# Mount the Docker socket as read-only so Traefik can listen to events
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./.infrastructure/conf/traefik/dev/traefik.yml:/traefik.yml:ro
- ./.infrastructure/conf/traefik/dev/traefik-certs.yml:/traefik-certs.yml
- ./.infrastructure/conf/traefik/dev/certificates/:/certificates
php:
build:
target: php-development
args:
USER_ID: ${SPIN_USER_ID}
GROUP_ID: ${SPIN_GROUP_ID}
PHP_VARIATION: "${PHP_VARIATION:-fpm-nginx}"
PHP_VERSION: "${PHP_VERSION:-8.5}"
BASE_OS: "${BASE_OS:-trixie}"
dockerfile: Dockerfile
stop_signal: SIGTERM
environment:
- APP_ENV=${APP_ENV:-local}
- APP_DEBUG=${APP_DEBUG:-true}
- APP_URL=${APP_URL:-https://${APP_DOMAIN:-benchkit.dev.test}}
# OPcache is enabled in the image (see Dockerfile) for production-like
# numbers. The image default freezes bytecode (validate_timestamps=0);
# here the source is bind-mounted and actively edited, so revalidate
# timestamps to keep OPcache on while still picking up live PHP edits.
- PHP_OPCACHE_VALIDATE_TIMESTAMPS=1
# Ephemeral database: the tmpfs mount below is wiped on every container
# start, so the DB (and any benchmark run lock in it) can never go
# stale. Nothing in the DB needs to survive — results are files.
- DB_DATABASE=/var/lib/benchkit/database.sqlite
# Migrate the fresh database on boot using the image's built-in
# automations (Laravel auto-creates the missing SQLite file). The cache
# automations are disabled — cached config would ignore .env changes.
- AUTORUN_ENABLED=true
- AUTORUN_LARAVEL_STORAGE_LINK=false
- AUTORUN_LARAVEL_OPTIMIZE=false
- AUTORUN_LARAVEL_CONFIG_CACHE=false
- AUTORUN_LARAVEL_ROUTE_CACHE=false
- AUTORUN_LARAVEL_VIEW_CACHE=false
- AUTORUN_LARAVEL_EVENT_CACHE=false
volumes:
- .:/var/www/html/
- type: tmpfs
target: /var/lib/benchkit
tmpfs:
mode: 0o1777
networks:
- development
depends_on:
- traefik
labels:
- "traefik.enable=true"
- "traefik.http.routers.laravel-web.rule=Host(`${APP_DOMAIN:-benchkit.dev.test}`)"
- "traefik.http.routers.laravel-web.tls=true"
- "traefik.http.routers.laravel-web.entrypoints=websecure"
- "traefik.http.services.laravel-web.loadbalancer.server.port=8443"
- "traefik.http.services.laravel-web.loadbalancer.server.scheme=https"
node:
build:
target: node-development
args:
USER_ID: ${SPIN_USER_ID}
GROUP_ID: ${SPIN_GROUP_ID}
dockerfile: Dockerfile
volumes:
- .:/usr/src/app/
working_dir: /usr/src/app/
environment:
# vite.config.js uses this for the HMR client host, so it must match the
# router rule below.
- VITE_DOMAIN=${VITE_DOMAIN:-vite.dev.test}
networks:
- development
command: ["yarn", "dev"]
labels:
- "traefik.enable=true"
- "traefik.http.routers.vite.rule=HostRegexp(`${VITE_DOMAIN:-vite.dev.test}`)"
- "traefik.http.routers.vite.entrypoints=websecure"
- "traefik.http.routers.vite.tls=true"
- "traefik.http.services.vite.loadbalancer.server.port=5173"
- "traefik.http.services.vite.loadbalancer.server.scheme=https"
mailpit:
image: axllent/mailpit
networks:
- development
labels:
- "traefik.enable=true"
- "traefik.http.routers.mailpit.rule=Host(`${MAILPIT_DOMAIN:-mailpit.dev.test}`)"
- "traefik.http.routers.mailpit.entrypoints=websecure"
- "traefik.http.routers.mailpit.tls=true"
- "traefik.http.services.mailpit.loadbalancer.server.port=8025"
- "traefik.http.services.mailpit.loadbalancer.server.scheme=http"
networks:
development: