- Move React/Vite frontend to apps/web/ (@budgetwise/web)
- Add apps/appwrite/ (@budgetwise/appwrite) to source-control the
Appwrite backend: declarative schema in appwrite.json (5 collections),
CLI-based deploy.sh for containerized use, functions/ dir for future
Appwrite Functions
- Add turbo.json for task orchestration (build, deploy, dev)
- Replace .gitlab-ci.yml with Woodpecker CI pipelines in .woodpecker/:
web-production.yml — push to main → build + rsync to prod
web-staging.yml — push to staging → build + rsync to staging
web-preview.yml — PR open → deploy to {pr}.{domain}; PR close → cleanup
appwrite.yml — schema changes in apps/appwrite/ → CLI deploy
- All secrets injected via Woodpecker CI (no committed .env files)
59 lines
1.9 KiB
YAML
59 lines
1.9 KiB
YAML
# ── Appwrite: Schema Deploy ────────────────────────────────────────────────────
|
|
# Triggered only when files inside apps/appwrite/ change.
|
|
# main branch → deploys to production Appwrite project
|
|
# staging branch → deploys to staging Appwrite project
|
|
#
|
|
# Uses the Appwrite CLI (via apps/appwrite/scripts/deploy.sh) to push the
|
|
# schema defined in apps/appwrite/appwrite.json declaratively.
|
|
#
|
|
# Required Woodpecker secrets:
|
|
# prod_appwrite_endpoint
|
|
# prod_appwrite_project_id
|
|
# prod_appwrite_api_key needs databases.write + collections.write scopes
|
|
# staging_appwrite_endpoint
|
|
# staging_appwrite_project_id
|
|
# staging_appwrite_api_key
|
|
# ─────────────────────────────────────────────────────────────────────────────
|
|
|
|
when:
|
|
- event: push
|
|
branch:
|
|
- main
|
|
- staging
|
|
path:
|
|
include:
|
|
- apps/appwrite/**
|
|
|
|
steps:
|
|
- name: deploy-production
|
|
image: node:20-alpine
|
|
environment:
|
|
APPWRITE_ENDPOINT:
|
|
from_secret: prod_appwrite_endpoint
|
|
APPWRITE_PROJECT_ID:
|
|
from_secret: prod_appwrite_project_id
|
|
APPWRITE_API_KEY:
|
|
from_secret: prod_appwrite_api_key
|
|
commands:
|
|
- npm ci
|
|
- npm run deploy -w @budgetwise/appwrite
|
|
when:
|
|
- branch: main
|
|
event: push
|
|
|
|
- name: deploy-staging
|
|
image: node:20-alpine
|
|
environment:
|
|
APPWRITE_ENDPOINT:
|
|
from_secret: staging_appwrite_endpoint
|
|
APPWRITE_PROJECT_ID:
|
|
from_secret: staging_appwrite_project_id
|
|
APPWRITE_API_KEY:
|
|
from_secret: staging_appwrite_api_key
|
|
commands:
|
|
- npm ci
|
|
- npm run deploy -w @budgetwise/appwrite
|
|
when:
|
|
- branch: staging
|
|
event: push
|