Compare commits

...

2 Commits

Author SHA1 Message Date
Kamil Gabryjelski
eb0359c401 fix(dev): use localhost in .agor.yml app_url template
Replace hardcoded private IP with localhost so the config works
for all contributors. Can be overridden per-worktree in the Agor UI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 00:36:04 +00:00
Kamil Gabryjelski
f6879240b3 fix(dev): allow external access to webpack dev server via env var
Add WEBPACK_ALLOW_ALL_HOSTS env var to opt into webpack-dev-server
allowedHosts: 'all', enabling access from external IPs (e.g. remote
dev environments). Default behavior is unchanged for local development.

Also adds .agor.yml environment template for docker-compose-light.yml
and passes the new env var in the light compose config.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 00:31:44 +00:00
3 changed files with 25 additions and 10 deletions

12
.agor.yml Normal file
View File

@@ -0,0 +1,12 @@
environment:
up_command: >-
NODE_PORT={{add 9100 worktree.unique_id}}
docker compose -p {{worktree.name}} -f docker-compose-light.yml up -d
down_command: >-
docker compose -p {{worktree.name}} -f docker-compose-light.yml down
nuke_command: >-
docker compose -p {{worktree.name}} -f docker-compose-light.yml down -v
health_check_url: 'http://localhost:{{add 9100 worktree.unique_id}}/health'
app_url: 'http://localhost:{{add 9100 worktree.unique_id}}'
logs_command: >-
docker compose -p {{worktree.name}} -f docker-compose-light.yml logs --tail=100 superset-node-light

View File

@@ -162,6 +162,7 @@ services:
# Webpack dev server must bind to 0.0.0.0 to be accessible from outside the container # Webpack dev server must bind to 0.0.0.0 to be accessible from outside the container
WEBPACK_DEVSERVER_HOST: "${WEBPACK_DEVSERVER_HOST:-0.0.0.0}" WEBPACK_DEVSERVER_HOST: "${WEBPACK_DEVSERVER_HOST:-0.0.0.0}"
WEBPACK_DEVSERVER_PORT: "${WEBPACK_DEVSERVER_PORT:-9000}" WEBPACK_DEVSERVER_PORT: "${WEBPACK_DEVSERVER_PORT:-9000}"
WEBPACK_ALLOW_ALL_HOSTS: "${WEBPACK_ALLOW_ALL_HOSTS:-true}"
ports: ports:
- "${NODE_PORT:-9001}:9000" # Parameterized port, accessible on all interfaces - "${NODE_PORT:-9001}:9000" # Parameterized port, accessible on all interfaces
command: ["/app/docker/docker-frontend.sh"] command: ["/app/docker/docker-frontend.sh"]

View File

@@ -666,16 +666,18 @@ if (isDevMode) {
liveReload: false, liveReload: false,
host: devserverHost, host: devserverHost,
port: devserverPort, port: devserverPort,
allowedHosts: [ allowedHosts: process.env.WEBPACK_ALLOW_ALL_HOSTS
...new Set([ ? 'all'
devserverHost, : [
'localhost', ...new Set([
'.localhost', devserverHost,
'127.0.0.1', 'localhost',
'::1', '.localhost',
'.local', '127.0.0.1',
]), '::1',
], '.local',
]),
],
proxy: [() => proxyConfig], proxy: [() => proxyConfig],
client: { client: {
overlay: { overlay: {