bea 0952c1abc9 docs: document VITE_API_BASE_URL and VITE_BASE_URL runtime configuration
- Add VITE_BASE_URL to frame-cms environment in docker-compose.yml (default /)
- Add inline comments explaining both CMS env vars
- Expand README with a runtime environment variables table and
  a subpath deployment example (e.g. serving CMS at /admin)
2026-03-22 14:16:40 +01:00

frame-deploy

Docker Compose setup for the full Frame stack:

  • frame-backend — Go REST API (auth, users, posts)
  • frame-cms — React/Nginx admin frontend
  • postgres — PostgreSQL 18

Quick Start

1. Clone this repo

git clone https://git.beatrice.wtf/panic.haus/frame-deploy
cd frame-deploy

2. Configure

cp backend.env.example backend.env

Edit backend.env and at minimum set:

Variable What to change
DATABASE_URL Leave as-is (points to the postgres service)
JWT_SECRET Change this in production
CORS_ALLOWED_ORIGINS URL where frame-cms will be served
FRONTEND_BASE_URL Same URL (used in email links)
SMTP_* Optional — needed for email verification

3. Pull images and start

docker compose pull
docker compose up -d

Services will be available at:


Runtime environment variables

Both CMS variables are injected at container startup — no image rebuild needed.

frame-cms

Variable Default Description
VITE_API_BASE_URL http://localhost:8080 URL of the backend API as seen by the browser
VITE_BASE_URL / Base path where the CMS is served
CMS_PORT 3000 Host port for the CMS container

frame-backend

Variable Default Description
BACKEND_PORT 8080 Host port for the backend container

Subpath deployment example

To serve the CMS at https://frame.example.com/admin and the API at https://frame.example.com/api:

# .env
VITE_API_BASE_URL=https://frame.example.com/api
VITE_BASE_URL=/admin

Then in your reverse proxy, strip /api before forwarding to the backend.


Create an admin user (first time only)

If SMTP is not configured, email verification won't work — you'll need to manually verify the user in the DB:

docker compose exec postgres psql -U postgres -d appdb \
  -c "UPDATE users SET email_verified = true WHERE email = 'your@email.com';"

Data persistence

Postgres data is stored in ./data/postgres/ (relative to this directory).
This folder is gitignored — back it up separately.


Updating

docker compose pull
docker compose up -d

Stopping

docker compose down        # stop, keep data
docker compose down -v     # stop + remove volumes (destructive)
Description
Docker Compose deployment for the Frame stack (backend + CMS + postgres)
Readme 30 KiB