Skip to content

Commit 330ea24

Browse files
committed
feat: enabled workers in dev (watchers)
1 parent 46fa840 commit 330ea24

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ CMD [ "frankenphp", "run", "--config", "/etc/caddy/Caddyfile" ]
5353
# Dev FrankenPHP image
5454
FROM frankenphp_base AS frankenphp_dev
5555

56-
ENV APP_ENV=dev XDEBUG_MODE=off
56+
ENV APP_ENV=dev
57+
ENV XDEBUG_MODE=off
58+
ENV FRANKENPHP_WORKER_CONFIG=watch
5759

5860
RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini"
5961

@@ -70,7 +72,6 @@ CMD [ "frankenphp", "run", "--config", "/etc/caddy/Caddyfile", "--watch" ]
7072
FROM frankenphp_base AS frankenphp_prod
7173

7274
ENV APP_ENV=prod
73-
ENV FRANKENPHP_CONFIG="import worker.Caddyfile"
7475

7576
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
7677

compose.override.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ services:
1212
# from the bind-mount for better performance by enabling the next line:
1313
#- /app/vendor
1414
environment:
15+
FRANKENPHP_WORKER_CONFIG: watch
1516
MERCURE_EXTRA_DIRECTIVES: demo
1617
# See https://xdebug.org/docs/all_settings#mode
1718
XDEBUG_MODE: "${XDEBUG_MODE:-off}"

frankenphp/Caddyfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33

44
frankenphp {
55
{$FRANKENPHP_CONFIG}
6+
7+
worker {
8+
file ./public/index.php
9+
env APP_RUNTIME Runtime\FrankenPhpSymfony\Runtime
10+
{$FRANKENPHP_WORKER_CONFIG}
11+
}
612
}
713
}
814

frankenphp/worker.Caddyfile

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)