feat: add postgres storage and remote sync

This commit is contained in:
2025-11-07 16:59:28 +08:00
parent c4be264ea5
commit d0ba2b188b
32 changed files with 1101 additions and 1170 deletions

18
docker-compose.yml Normal file
View File

@@ -0,0 +1,18 @@
services:
postgres:
image: postgres:16-alpine
container_name: funstat-postgres
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB:-funstat}
POSTGRES_USER: ${POSTGRES_USER:-funstat}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-funstat_dev_password}
ports:
- "${POSTGRES_PORT:-5433}:5432"
volumes:
- ./local_data/postgres:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "${POSTGRES_USER:-funstat}"]
interval: 10s
timeout: 5s
retries: 5