feat: improvements to web dashboard

This commit is contained in:
syntaxbullet
2026-01-08 13:56:25 +01:00
parent 47507dd65a
commit 9e7f18787b
9 changed files with 332 additions and 108 deletions

View File

@@ -6,11 +6,20 @@ services:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_NAME}
ports:
- "127.0.0.1:${DB_PORT}:5432"
# Uncomment to access DB from host (for debugging/drizzle-kit studio)
# ports:
# - "127.0.0.1:${DB_PORT}:5432"
volumes:
- ./src/db/data:/var/lib/postgresql/data
- ./src/db/log:/var/log/postgresql
networks:
- internal
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U ${DB_USER} -d ${DB_NAME}" ]
interval: 5s
timeout: 5s
retries: 5
app:
container_name: aurora_app
restart: unless-stopped
@@ -24,19 +33,30 @@ services:
volumes:
- .:/app
- /app/node_modules
- /app/src/web/node_modules
environment:
- HOST=0.0.0.0
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
- DB_NAME=${DB_NAME}
- DB_PORT=${DB_PORT}
- DB_PORT=5432
- DB_HOST=db
- DISCORD_BOT_TOKEN=${DISCORD_BOT_TOKEN}
- DISCORD_GUILD_ID=${DISCORD_GUILD_ID}
- DISCORD_CLIENT_ID=${DISCORD_CLIENT_ID}
- DATABASE_URL=postgresql://${DB_USER}:${DB_PASSWORD}@db:5432/${DB_NAME}
depends_on:
- db
db:
condition: service_healthy
networks:
- internal
- web
healthcheck:
test: [ "CMD", "bun", "-e", "fetch('http://localhost:3000/api/health').then(r => r.ok ? process.exit(0) : process.exit(1)).catch(() => process.exit(1))" ]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
command: bun run dev
studio:
@@ -51,13 +71,24 @@ services:
volumes:
- .:/app
- /app/node_modules
- /app/src/web/node_modules
environment:
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
- DB_NAME=${DB_NAME}
- DB_PORT=${DB_PORT}
- DB_PORT=5432
- DB_HOST=db
- DATABASE_URL=postgresql://${DB_USER}:${DB_PASSWORD}@db:5432/${DB_NAME}
depends_on:
- db
db:
condition: service_healthy
networks:
- internal
command: bun run db:studio
networks:
internal:
driver: bridge
internal: true # No external access
web:
driver: bridge # Can be accessed from host