diff --git a/Docker-AIO/.env.example b/Docker-AIO/.env.example index 1495752..fae38b5 100644 --- a/Docker-AIO/.env.example +++ b/Docker-AIO/.env.example @@ -45,3 +45,13 @@ VITE_API_BASE= # different version. Leaving it commented out keeps the pin (an empty value here # is passed through as-is and would resolve the latest release at build time). #PB_VERSION=0.39.11 + +# --- Settings the API Server panel can also change --------------------------- +# The panel's Settings screens apply these immediately, but only for the life of +# the container — the value below is re-applied on every restart and wins. Set it +# here to make a change permanent. (POCKETBASE_URL is fixed to this container's +# own PocketBase and is not meant to be repointed.) +# WEBAPP_URL the Web App address the panel status page probes; nginx +# serves it on port 80 inside this container. +# CORS_ALLOW_ORIGINS browser origins allowed to call the API Server directly. +# WEBAPP_URL=http://127.0.0.1:80 diff --git a/Docker-AIO/.env.prod.example b/Docker-AIO/.env.prod.example index fc07184..e37d156 100644 --- a/Docker-AIO/.env.prod.example +++ b/Docker-AIO/.env.prod.example @@ -44,8 +44,18 @@ WEB_PORT=8090 PB_PORT=8070 API_PORT=8080 +# --- Settings the API Server panel can also change --------------------------- +# The panel's Settings screens apply these immediately, but only for the life of +# the container — the value below is re-applied on every restart and wins. Set it +# here to make a change permanent. (POCKETBASE_URL is fixed to this container's +# own PocketBase and is not meant to be repointed.) +# WEBAPP_URL the Web App address the panel status page probes; nginx +# serves it on port 80 inside this container. +# CORS_ALLOW_ORIGINS browser origins allowed to call the API Server directly. +# WEBAPP_URL=http://127.0.0.1:80 + # --- Storage ----------------------------------------------------------------- -# Defaults are Docker-managed named volumes. Set either to an absolute host path +# One Docker-managed named volume by default. Set it to an absolute host path # for a bind mount, e.g. PB_DATA=/srv/drivervault/pb_data. # PB_DATA — the PocketBase database and uploads. It is the only volume in the # image: the API Server keeps no state on disk, so everything it owns (plugin diff --git a/Docker-AIO/docker-compose.prod.yml b/Docker-AIO/docker-compose.prod.yml index 6c40d66..76dce9d 100644 --- a/Docker-AIO/docker-compose.prod.yml +++ b/Docker-AIO/docker-compose.prod.yml @@ -24,8 +24,10 @@ services: # Match CORS to the web origin (only used if a browser calls the API directly). CORS_ALLOW_ORIGINS: "${CORS_ALLOW_ORIGINS:-http://localhost:8090}" # Probed by the panel status page. nginx serves the Web App on port 80 - # inside this container, so the default (localhost:8090) would never answer. - WEBAPP_URL: "http://127.0.0.1:80" + # inside this container, so plain localhost:8090 would never answer. + # Override WEBAPP_URL in .env to make a change from the panel's Web App + # screen permanent; the panel alone only holds it for the container's life. + WEBAPP_URL: "${WEBAPP_URL:-http://127.0.0.1:80}" # Schema + super-admin bootstrap (idempotent). Leave this ON: a release can # add collections or fields the server needs, and a stack that skips the # bootstrap never gets them. The API Server self-heals exactly one thing — diff --git a/Docker-AIO/docker-compose.yml b/Docker-AIO/docker-compose.yml index 1fa8b4a..df113b6 100644 --- a/Docker-AIO/docker-compose.yml +++ b/Docker-AIO/docker-compose.yml @@ -27,8 +27,10 @@ services: # Match CORS to the web origin (only used if a browser calls the API directly). CORS_ALLOW_ORIGINS: "${CORS_ALLOW_ORIGINS:-http://localhost:8090}" # Probed by the panel status page. nginx serves the Web App on port 80 - # inside this container, so the default (localhost:8090) would never answer. - WEBAPP_URL: "http://127.0.0.1:80" + # inside this container, so plain localhost:8090 would never answer. + # Override WEBAPP_URL in .env to make a change from the panel's Web App + # screen permanent; the panel alone only holds it for the container's life. + WEBAPP_URL: "${WEBAPP_URL:-http://127.0.0.1:80}" # Schema + super-admin bootstrap (idempotent). Leave this ON: a release can # add collections or fields the server needs, and a stack that skips the # bootstrap never gets them. The API Server self-heals exactly one thing — diff --git a/Docker/.env.example b/Docker/.env.example index 5a3db4b..2c948a7 100644 --- a/Docker/.env.example +++ b/Docker/.env.example @@ -43,3 +43,17 @@ WEB_PORT=8090 # --- Web App build ----------------------------------------------------------- # Leave empty so the browser uses same-origin /api (proxied by the BFF). VITE_API_BASE= + +# --- Settings the API Server panel can also change --------------------------- +# The panel's Settings screens apply these immediately, but only for the life of +# the container — the values below are re-applied on every restart and win. Set +# them here to make a change permanent. +# POCKETBASE_URL where the API Server looks for the database. Defaults to +# the bundled pocketbase service; set it to reach one +# outside this stack. +# WEBAPP_URL the Web App address the panel status page probes. It is +# a container-to-container call, so it must be reachable +# from the API Server, not from your browser. +# CORS_ALLOW_ORIGINS browser origins allowed to call the API Server directly. +# POCKETBASE_URL=http://pocketbase:8070 +# WEBAPP_URL=http://web-app:8090 diff --git a/Docker/.env.prod.example b/Docker/.env.prod.example index edbee5d..52250e2 100644 --- a/Docker/.env.prod.example +++ b/Docker/.env.prod.example @@ -58,9 +58,23 @@ PB_BIND=127.0.0.1 API_PORT=8080 API_BIND=127.0.0.1 +# --- Settings the API Server panel can also change --------------------------- +# The panel's Settings screens apply these immediately, but only for the life of +# the container — the values below are re-applied on every restart and win. Set +# them here to make a change permanent. +# POCKETBASE_URL where the API Server looks for the database. Defaults to +# the bundled pocketbase service; set it to reach one +# outside this stack. +# WEBAPP_URL the Web App address the panel status page probes. It is +# a container-to-container call, so it must be reachable +# from the API Server, not from your browser. +# CORS_ALLOW_ORIGINS browser origins allowed to call the API Server directly. +# POCKETBASE_URL=http://pocketbase:8070 +# WEBAPP_URL=http://web-app:8090 + # --- Storage ----------------------------------------------------------------- -# Defaults are Docker-managed named volumes. To store either on a host path -# instead, set it to an absolute path, e.g. PB_DATA=/srv/drivervault/pb_data. +# One Docker-managed named volume by default. To store it on a host path +# instead, set an absolute path, e.g. PB_DATA=/srv/drivervault/pb_data. # PB_DATA — the PocketBase database and uploads. It is the only volume in the # stack: the API Server keeps no state on disk, so everything it owns (plugin # settings included) is backed up by backing up this one path. diff --git a/Docker/docker-compose.prod.yml b/Docker/docker-compose.prod.yml index 1cde541..c9e89ce 100644 --- a/Docker/docker-compose.prod.yml +++ b/Docker/docker-compose.prod.yml @@ -49,14 +49,19 @@ services: condition: service_healthy environment: API_ADDR: ":8080" - # Reach PocketBase by its service name on the internal network. - POCKETBASE_URL: "http://pocketbase:8070" + # Reach PocketBase by its service name on the internal network. Override + # POCKETBASE_URL in .env to point the API Server at a database outside + # this stack — that is also how you make a retarget done from the panel + # permanent, since the panel's change lasts only for the container's life. + POCKETBASE_URL: "${POCKETBASE_URL:-http://pocketbase:8070}" POCKETBASE_ADMIN_EMAIL: "${PB_ADMIN_EMAIL}" POCKETBASE_ADMIN_PASSWORD: "${PB_ADMIN_PASSWORD}" # Probed by the panel status page. This is a server-to-server call inside - # the compose network, so it must be the service name — the default - # (localhost:8090) would resolve to this container itself. - WEBAPP_URL: "http://web-app:8090" + # the compose network, so the default is the service name — plain + # localhost:8090 would resolve to this container itself. Override + # WEBAPP_URL in .env to make a change from the panel's Web App screen + # permanent; the panel alone only holds it for the container's life. + WEBAPP_URL: "${WEBAPP_URL:-http://web-app:8090}" CORS_ALLOW_ORIGINS: "${CORS_ALLOW_ORIGINS:-http://localhost:8090}" AUTH_USERS_COLLECTION: "${AUTH_USERS_COLLECTION:-users}" # Schema + super-admin bootstrap (idempotent). Leave this ON: a release can diff --git a/Docker/docker-compose.yml b/Docker/docker-compose.yml index 405e880..e041f05 100644 --- a/Docker/docker-compose.yml +++ b/Docker/docker-compose.yml @@ -38,14 +38,19 @@ services: condition: service_healthy environment: API_ADDR: ":8080" - # Reach PocketBase by its service name on the internal network. - POCKETBASE_URL: "http://pocketbase:8070" + # Reach PocketBase by its service name on the internal network. Override + # POCKETBASE_URL in .env to point the API Server at a database outside + # this stack — that is also how you make a retarget done from the panel + # permanent, since the panel's change lasts only for the container's life. + POCKETBASE_URL: "${POCKETBASE_URL:-http://pocketbase:8070}" POCKETBASE_ADMIN_EMAIL: "${PB_ADMIN_EMAIL}" POCKETBASE_ADMIN_PASSWORD: "${PB_ADMIN_PASSWORD}" # Probed by the panel status page. This is a server-to-server call inside - # the compose network, so it must be the service name — the default - # (localhost:8090) would resolve to this container itself. - WEBAPP_URL: "http://web-app:8090" + # the compose network, so the default is the service name — plain + # localhost:8090 would resolve to this container itself. Override + # WEBAPP_URL in .env to make a change from the panel's Web App screen + # permanent; the panel alone only holds it for the container's life. + WEBAPP_URL: "${WEBAPP_URL:-http://web-app:8090}" # Same-origin requests go through the Web App BFF, so CORS is only needed # if the browser ever calls the API Server directly. Default to the web origin. CORS_ALLOW_ORIGINS: "${CORS_ALLOW_ORIGINS:-http://localhost:8090}"