Operations
Deploy with Docker Compose
Build the shipped containers, run initialization and verify the deployed web applications.
Prepare a deployment directory
The shipped Compose file lives in deploy/docker. It builds the API, migrator, both web clients and supporting service images from the source tree. Use a reviewed release and keep its database and file-store backups with your deployment records.
cd deploy/docker
cp .env.example .env
Copy only when .env does not already exist. A project generated with g may already have a file containing unique local credentials; do not overwrite it. Edit the file privately before starting the stack. The examples below assume the standard component set.
Set URLs, credentials and delivery
| Values to configure | Why they matter |
|---|---|
FSH_API_URL, FSH_ADMIN_URL, FSH_DASHBOARD_URL |
Browser access, runtime client settings and allowed origins |
FSH_S3_PUBLIC_URL |
Browser-reachable signed upload/download endpoint |
JWT_SIGNING_KEY, SEED_ADMIN_PASSWORD |
Authentication and initial root account |
HANGFIRE_USERNAME, HANGFIRE_PASSWORD |
Jobs dashboard access |
POSTGRES_PASSWORD, REDIS_PASSWORD, RUSTFS_ACCESS_KEY, RUSTFS_SECRET_KEY |
Service credentials |
FSH_SMTP_*, FSH_MAIL_FROM |
Mail transport and accepted sender |
Keep the shipped variable names, including FSH_*, because they are the actual Compose inputs. The example enables Mailpit: mail stays in the local catcher until you configure a real provider and remove the mail-catcher profile. See mailing.
Build and start
docker compose config --quiet
docker compose up -d --build
docker compose ps --all
docker compose logs migrator
docker compose logs api
The migrator runs apply --seed; the API waits for successful migration and storage initialization. Expect the migrator to exit with code 0. Acme/Globex demo seeding is not part of this production graph. First sign-in uses tenant root, email admin@root.com and your configured SEED_ADMIN_PASSWORD.
The API image installs its matching Chromium build and runs without root. Compose supplies the reporting seccomp profile. Confirm the deployment host supports that sandbox before accepting PDF output.
Deploy with Caddy and automatic HTTPS
Since v1.0.2, the repository includes deploy/docker/Caddyfile and docker-compose.https.yml for public HTTPS on four domain names: API, Admin, Dashboard and RustFS S3. First configure real DNS A/AAAA records (AAAA only when IPv6 works), open TCP 80/443, set all GHAYL_*_DOMAIN variables, the matching HTTPS FSH_*_URL values, GHAYL_ACME_EMAIL, and unique production secrets in deploy/docker/.env.
cd deploy/docker
docker compose -f docker-compose.yml -f docker-compose.https.yml config --quiet
docker compose -f docker-compose.yml -f docker-compose.https.yml up -d --build
docker compose -f docker-compose.yml -f docker-compose.https.yml logs -f caddy
Caddy obtains and renews public certificates and redirects HTTP to HTTPS. Backend host ports are bound to 127.0.0.1; proxy traffic traverses a private Docker network. GhaylStack's existing Forwarded Headers middleware trusts only the configured proxy address. Keep CORS origins exact, and forward the original Host header to RustFS for signed uploads. Protect the certificate volumes, never use development credentials or developer certificates in production, and validate uploads, WebSockets and backups before inviting users.
Complete Caddy/HTTPS deployment guide. For the older v1.0.1 archive, supply your own HTTPS reverse proxy: the Caddy overlay was not included there.
Verify and update deliberately
From the host, inspect /health/live and /health/ready on the API and /config.json on both web clients. Then use the actual HTTPS origins to sign in, request an email, upload/download a file and generate a report. Verify the resulting organization and permissions, not just HTTP status.
For upgrades, back up and test restore first. Build the reviewed images, run the migrator explicitly before replacing API replicas, and retain its exit status. Do not assume an already-completed Compose job will rerun merely because you restarted a web container. Keep database rollback separate from application-image rollback.
Sources and related guides
Compose services, environment template, API Dockerfile and migrator. Continue with production preparation, migrations and observability.