mirror of
https://github.com/MarijnDoeve/TijdVoorDeTest.git
synced 2026-07-14 22:05:18 +02:00
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.
This commit is contained in:
+19
-1
@@ -12,6 +12,7 @@ services:
|
||||
- ./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
|
||||
@@ -49,7 +50,23 @@ services:
|
||||
- -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 ###
|
||||
|
||||
@@ -77,3 +94,4 @@ services:
|
||||
|
||||
volumes:
|
||||
sass:
|
||||
typescript:
|
||||
|
||||
Reference in New Issue
Block a user