- Add PostgreSQL with asyncpg for persistent storage
- Create db.py module with async database operations
- Create migrate.py script to migrate JSON data to PostgreSQL
- Update docker-compose.yml with PostgreSQL service
- Home page now shows README with styled headings
- Remove /ui prefix routes, use content negotiation on main routes
- Add /activities/{idx} as canonical route (with /activity redirect)
- Update /assets/{name} to support HTML and JSON responses
- Convert auth.py to use async database operations
- RSA keys still stored as files in $ARTDAG_DATA/keys/
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
49 lines
1.0 KiB
YAML
49 lines
1.0 KiB
YAML
version: "3.8"
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
environment:
|
|
POSTGRES_USER: artdag
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-artdag}
|
|
POSTGRES_DB: artdag
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
networks:
|
|
- internal
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U artdag"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
l2-server:
|
|
image: git.rose-ash.com/art-dag/l2-server:latest
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
- ARTDAG_DATA=/data/l2
|
|
- DATABASE_URL=postgresql://artdag:${POSTGRES_PASSWORD:-artdag}@postgres:5432/artdag
|
|
# ARTDAG_DOMAIN, ARTDAG_USER, ARTDAG_L1, JWT_SECRET from .env file
|
|
volumes:
|
|
- l2_data:/data/l2 # Still needed for RSA keys
|
|
networks:
|
|
- internal
|
|
- externalnet
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
deploy:
|
|
replicas: 1
|
|
restart_policy:
|
|
condition: on-failure
|
|
|
|
volumes:
|
|
l2_data:
|
|
postgres_data:
|
|
|
|
networks:
|
|
internal:
|
|
externalnet:
|
|
external: true
|