fix(deploy): create /opt/staging and write compose.yml on every deploy

The VPS had no /opt/staging directory or compose file, causing the deploy
step to fail with "No such file or directory". Now the workflow:
- Creates /opt/staging if missing
- Writes compose.yml on every deploy (keeps it in sync with CI)
- Touches .env so podman compose doesn't error if no secrets file exists yet

Also adds deploy/staging/.env.example documenting runtime secrets that must
be set manually on the VPS after first deploy.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-08 11:10:52 +03:00
parent bfc20ac293
commit 0b9ac5cd46
2 changed files with 50 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
# Runtime secrets for staging containers.
# Copy this file to /opt/staging/.env on the VPS and fill in the values.
# NEXT_PUBLIC_* vars are already baked into the Docker images at build time —
# only server-side secrets that Next.js reads at runtime go here.
# Storefront — Clerk server-side key
CLERK_SECRET_KEY=
# Admin — Clerk server-side key (different Clerk instance)
# Add a second .env or use per-service env_file if keys differ per container.
# For now a single .env is shared; storefront ignores keys it doesn't use.
# Stripe (used by storefront checkout server actions if any)
STRIPE_SECRET_KEY=
STRIPE_WEBHOOK_SECRET=