Files
TijdVoorDeTest/compose.override.yaml
T
Marijn 32daa17e0d Add a typescript watch service so TS assets rebuild automatically
Previously the compiled TypeScript output only existed after manually
running `bin/console typescript:build`, so a fresh checkout/worktree (or a
`just clean`) would 500 on any page rendering a TS asset until someone
remembered to build it by hand. Mirrors the existing sass watch service,
including sharing a named volume with php since the Dockerfile's
`VOLUME /app/var/` otherwise gives every container its own private,
unsynced /app/var.

Also add a `just compose` passthrough recipe for ad-hoc docker compose
commands (logs, ps, top, etc.) using the worktree's env.
2026-07-14 13:14:31 +02:00

98 lines
2.3 KiB
YAML

# yaml-language-server: $schema=https://raw.githubusercontent.com/compose-spec/compose-go/master/schema/compose-spec.json
# Development environment override
services:
php:
build:
context: .
target: frankenphp_dev
volumes:
- ./:/app
- ~/.composer/cache:/root/.composer/cache
- ./frankenphp/Caddyfile:/etc/caddy/Caddyfile:ro
- ./frankenphp/conf.d/20-app.dev.ini:/usr/local/etc/php/app.conf.d/20-app.dev.ini:ro
- ${CADDY_DATA_DIR:-./frankenphp/data}:/data
- sass:/app/var/sass
- typescript:/app/var/typescript
environment:
MERCURE_EXTRA_DIRECTIVES: demo
# See https://xdebug.org/docs/all_settings#mode
XDEBUG_MODE: "${XDEBUG_MODE:-off}"
MAILER_DSN: "smtp://mailer:1025"
extra_hosts:
# Ensure that host.docker.internal is correctly defined on Linux
- host.docker.internal:host-gateway
tty: true
ports:
# HTTP
- target: 80
published: ${HTTP_PORT:-8080}
protocol: tcp
# HTTPS
- target: 443
published: ${HTTPS_PORT:-8443}
protocol: tcp
# HTTP/3
- target: 443
published: ${HTTPS_PORT:-8443}
protocol: udp
sass:
image: ${IMAGES_PREFIX:-}app-php
volumes:
- ./:/app:ro
- sass:/app/var/sass
entrypoint: ''
depends_on:
- php
command:
- bin/console
- sass:build
- --watch
- -v
healthcheck:
disable: true
typescript:
image: ${IMAGES_PREFIX:-}app-php
volumes:
- ./:/app:ro
- typescript:/app/var/typescript
entrypoint: ''
depends_on:
- php
command:
- bin/console
- typescript:build
- --watch
- -v
healthcheck:
disable: true
###> symfony/mercure-bundle ###
###< symfony/mercure-bundle ###
###> doctrine/doctrine-bundle ###
database:
ports:
- "${POSTGRES_PORT:-5430}:5432"
###< doctrine/doctrine-bundle ###
###> symfony/mailer ###
mailer:
image: axllent/mailpit
ports:
- "1025"
- "${MAILPIT_PORT:-8025}:8025"
environment:
MP_SMTP_AUTH_ACCEPT_ANY: 1
MP_SMTP_AUTH_ALLOW_INSECURE: 1
###< symfony/mailer ###
spotlight:
image: ghcr.io/getsentry/spotlight:latest
ports:
- "${SPOTLIGHT_PORT:-8969}:8969"
volumes:
sass:
typescript: