- pb_hooks/main.pb.js: bootstrap hook applying SMTP + meta settings from env vars on every boot (mail disabled when SMTP_HOST is unset) - docker-compose.yml: expose SMTP_* / PB_APP_URL on the pocketbase service - pocketbase/Dockerfile: bundle pb_hooks - README: document the new variables
40 lines
1.6 KiB
YAML
40 lines
1.6 KiB
YAML
# 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.
|
|
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
|
|
|
|
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
|
|
|
|
volumes:
|
|
pb_data:
|