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:
@@ -71,6 +71,9 @@ up *args: init
|
|||||||
set +a
|
set +a
|
||||||
docker compose up -d {{ args }}
|
docker compose up -d {{ args }}
|
||||||
|
|
||||||
|
compose *args:
|
||||||
|
docker compose {{ args }}
|
||||||
|
|
||||||
down *args:
|
down *args:
|
||||||
docker compose down --remove-orphans {{ args }}
|
docker compose down --remove-orphans {{ args }}
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ services:
|
|||||||
- ./frankenphp/conf.d/20-app.dev.ini:/usr/local/etc/php/app.conf.d/20-app.dev.ini: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
|
- ${CADDY_DATA_DIR:-./frankenphp/data}:/data
|
||||||
- sass:/app/var/sass
|
- sass:/app/var/sass
|
||||||
|
- typescript:/app/var/typescript
|
||||||
environment:
|
environment:
|
||||||
MERCURE_EXTRA_DIRECTIVES: demo
|
MERCURE_EXTRA_DIRECTIVES: demo
|
||||||
# See https://xdebug.org/docs/all_settings#mode
|
# See https://xdebug.org/docs/all_settings#mode
|
||||||
@@ -50,6 +51,22 @@ services:
|
|||||||
healthcheck:
|
healthcheck:
|
||||||
disable: true
|
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 ###
|
||||||
###< symfony/mercure-bundle ###
|
###< symfony/mercure-bundle ###
|
||||||
|
|
||||||
@@ -77,3 +94,4 @@ services:
|
|||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
sass:
|
sass:
|
||||||
|
typescript:
|
||||||
|
|||||||
Reference in New Issue
Block a user