feat: add WonderQ admin backend
Add FastAPI admin/public API service, database setup, Docker deployment files, docs, and tests.
This commit is contained in:
50
docker-compose.yml
Normal file
50
docker-compose.yml
Normal file
@@ -0,0 +1,50 @@
|
||||
services:
|
||||
api:
|
||||
build: .
|
||||
container_name: wonderq-admin-api
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
DATABASE_URL: postgresql://miniapp:miniapp_dev_password@postgres:5432/miniapp
|
||||
JWT_SECRET: replace-with-a-long-random-secret-before-production
|
||||
PORT: 4000
|
||||
LOG_LEVEL: info
|
||||
ports:
|
||||
- "4000:4000"
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_started
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl -fsS http://localhost:4000/health || exit 1"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
container_name: wonderq-admin-postgres
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_DB: miniapp
|
||||
POSTGRES_USER: miniapp
|
||||
POSTGRES_PASSWORD: miniapp_dev_password
|
||||
ports:
|
||||
- "5433:5432"
|
||||
volumes:
|
||||
- miniapp-postgres-data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U miniapp -d miniapp"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
container_name: wonderq-admin-redis
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "6380:6379"
|
||||
|
||||
volumes:
|
||||
miniapp-postgres-data:
|
||||
Reference in New Issue
Block a user