local dev stuff

This commit is contained in:
2026-03-09 16:56:58 +01:00
parent 627628f36c
commit b27db93a90
3 changed files with 64 additions and 0 deletions

11
.env.example Normal file
View File

@@ -0,0 +1,11 @@
# Backend
DATABASE_URL=postgres://campaign_manager:devpassword@localhost:5432/campaign_manager
JWT_SECRET=change-me-to-a-long-random-secret
PORT=3000
# Object storage (Cloudflare R2 or any S3-compatible)
S3_ENDPOINT=https://<accountid>.r2.cloudflarestorage.com
S3_BUCKET=campaign-manager-assets
S3_ACCESS_KEY_ID=
S3_SECRET_ACCESS_KEY=
S3_PUBLIC_URL=https://assets.campaign-manager.example.com

View File

@@ -31,3 +31,36 @@
Verification results: ✅ symbiote build → dist/ with index.html + manifest.json ✅ web build → SvelteKit static output
✅ cargo check → no errors
Local dev workflow is now:
# Start Postgres
docker compose up -d
# Copy and fill in secrets
cp .env.example .env
# Run backend
cd backend && cargo run
# Symbiote (build-watch mode — see below)
pnpm dev:symbiote
# Web app
pnpm dev:web Local dev workflow is now:
# Start Postgres
docker compose up -d
# Copy and fill in secrets
cp .env.example .env
# Run backend
cd backend && cargo run
# Symbiote (build-watch mode — see below)
pnpm dev:symbiote
# Web app
pnpm dev:web

20
docker-compose.yml Normal file
View File

@@ -0,0 +1,20 @@
services:
postgres:
image: postgres:18
restart: unless-stopped
environment:
POSTGRES_DB: campaign_manager
POSTGRES_USER: campaign_manager
POSTGRES_PASSWORD: devpassword
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U campaign_manager"]
interval: 5s
timeout: 5s
retries: 5
volumes:
postgres_data: