Drop bundled PocketBase: app-only deployment via POCKETBASE_URL
The external PocketBase instance is referenced by the POCKETBASE_URL env variable (compose and Dockerfile build packs both supported). The schema export stays at pb_schema.json as a reference for provisioning.
This commit is contained in:
+5
-41
@@ -1,46 +1,13 @@
|
||||
# Full PokeShare stack: the Astro app and its PocketBase backend.
|
||||
# In Coolify, deploy this file as a "Docker Compose" resource.
|
||||
# The `app` service is the one to expose on your public domain.
|
||||
# `pocketbase` stays on the internal network — expose it on a subdomain
|
||||
# only if you want to reach the admin UI (/_/) from outside.
|
||||
# PokeShare app, pointing at an external PocketBase instance.
|
||||
# In Coolify, deploy this file as a "Docker Compose" resource and expose the
|
||||
# `app` service on your public domain.
|
||||
services:
|
||||
pocketbase:
|
||||
build: ./pocketbase
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
# Optional: create/update the admin account on boot (min 8 chars)
|
||||
PB_SUPERUSER_EMAIL: ${PB_SUPERUSER_EMAIL:-}
|
||||
PB_SUPERUSER_PASSWORD: ${PB_SUPERUSER_PASSWORD:-}
|
||||
# Optional: app URL used in transactional emails (reset links...)
|
||||
PB_APP_URL: ${PB_APP_URL:-}
|
||||
# Optional: SMTP for transactional emails. If SMTP_HOST is empty,
|
||||
# mail stays disabled (the rest is ignored).
|
||||
SMTP_HOST: ${SMTP_HOST:-}
|
||||
SMTP_PORT: ${SMTP_PORT:-587}
|
||||
SMTP_USERNAME: ${SMTP_USERNAME:-}
|
||||
SMTP_PASSWORD: ${SMTP_PASSWORD:-}
|
||||
SMTP_TLS: ${SMTP_TLS:-true}
|
||||
SMTP_SENDER_NAME: ${SMTP_SENDER_NAME:-PokeShare}
|
||||
SMTP_SENDER_ADDRESS: ${SMTP_SENDER_ADDRESS:-}
|
||||
volumes:
|
||||
- pb_data:/pb/pb_data
|
||||
healthcheck:
|
||||
test: "curl -fsS http://localhost:8090/api/health || exit 1"
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 15s
|
||||
|
||||
app:
|
||||
build: .
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
# Internal service URL — the browser never talks to PocketBase
|
||||
# directly, everything goes through the Astro server.
|
||||
POCKETBASE_URL: http://pocketbase:8090
|
||||
depends_on:
|
||||
pocketbase:
|
||||
condition: service_healthy
|
||||
# Full URL of the PocketBase instance to use (required).
|
||||
POCKETBASE_URL: ${POCKETBASE_URL:-https://pokeshare.namarusaja.me}
|
||||
healthcheck:
|
||||
# / redirects to /login (302) — check a 200 endpoint instead
|
||||
test: "wget -q -O /dev/null http://localhost:4321/login || exit 1"
|
||||
@@ -48,6 +15,3 @@ services:
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 15s
|
||||
|
||||
volumes:
|
||||
pb_data:
|
||||
|
||||
Reference in New Issue
Block a user