feat(dev): add compose files and dev-login bypass route

- compose.prod.yml: production stack with registry image, healthcheck,
  migration service
- compose.test.yml: local test stack with source mount and LOCAL=true
- routes/dev-login.ts: fake admin JWT login, only active when LOCAL=true
- routes/_middleware.ts: expose /dev-login as public route

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-26 23:01:59 +02:00
parent 5ba8b8cb68
commit fcc9547a30
4 changed files with 134 additions and 0 deletions
+49
View File
@@ -0,0 +1,49 @@
services:
db:
image: postgres:17-alpine
restart: unless-stopped
environment:
POSTGRES_PASSWORD: testpass
POSTGRES_USER: postgres
POSTGRES_DB: polympr_test
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 10
migrate:
image: denoland/deno:alpine
working_dir: /app
volumes:
- .:/app
command: task migrate
environment:
POSTGRES_HOST: db
POSTGRES_PORT: 5432
POSTGRES_USER: postgres
POSTGRES_PASS: testpass
POSTGRES_DB: polympr_test
LOCAL: "true"
depends_on:
db:
condition: service_healthy
app:
image: denoland/deno:alpine
working_dir: /app
volumes:
- .:/app
command: run -A --unstable-ffi main.ts
ports:
- "4430:443"
environment:
POSTGRES_HOST: db
POSTGRES_PORT: 5432
POSTGRES_USER: postgres
POSTGRES_PASS: testpass
POSTGRES_DB: polympr_test
LOCAL: "true"
depends_on:
migrate:
condition: service_completed_successfully