ADMIN_EMAIL and ADMIN_PASSWORD were in the .env file but not forwarded to the API container — bootstrap_admin() couldn't read them, so no initial user was created. Login returned 400 on every attempt because no user existed in the database. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
83 lines
2.2 KiB
YAML
83 lines
2.2 KiB
YAML
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
container_name: corrosion-db
|
|
environment:
|
|
POSTGRES_DB: corrosion
|
|
POSTGRES_USER: corrosion
|
|
POSTGRES_PASSWORD: ${DB_PASSWORD:-corrosion_dev}
|
|
volumes:
|
|
- pg_data:/var/lib/postgresql/data
|
|
ports:
|
|
- "5432:5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U corrosion"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
nats:
|
|
image: nats:latest
|
|
container_name: corrosion-nats
|
|
command:
|
|
- "--config=/etc/nats/nats.conf"
|
|
volumes:
|
|
- nats_data:/data
|
|
- ./nats.conf:/etc/nats/nats.conf:ro
|
|
ports:
|
|
- "8089:4222" # Client connections
|
|
|
|
api:
|
|
build:
|
|
context: ../backend
|
|
dockerfile: ../docker/Dockerfile.api
|
|
container_name: corrosion-api
|
|
environment:
|
|
DATABASE_URL: postgres://corrosion:${DB_PASSWORD:-corrosion_dev}@postgres:5432/corrosion
|
|
NATS_URL: nats://nats:4222
|
|
JWT_SECRET: ${JWT_SECRET}
|
|
ENCRYPTION_KEY: ${ENCRYPTION_KEY}
|
|
CLOUDFLARE_API_TOKEN: ${CLOUDFLARE_API_TOKEN}
|
|
CLOUDFLARE_ZONE_ID: ${CLOUDFLARE_ZONE_ID}
|
|
STEAM_API_KEY: ${STEAM_API_KEY}
|
|
SMTP_HOST: ${SMTP_HOST:-localhost}
|
|
SMTP_PORT: ${SMTP_PORT:-587}
|
|
SMTP_USERNAME: ${SMTP_USERNAME}
|
|
SMTP_PASSWORD: ${SMTP_PASSWORD}
|
|
SMTP_FROM: ${SMTP_FROM:-noreply@corrosionmgmt.com}
|
|
FRONTEND_URL: ${FRONTEND_URL:-https://panel.corrosionmgmt.com}
|
|
ADMIN_EMAIL: ${ADMIN_EMAIL}
|
|
ADMIN_PASSWORD: ${ADMIN_PASSWORD}
|
|
ADMIN_USERNAME: ${ADMIN_USERNAME:-Commander}
|
|
ADMIN_LICENSE_KEY: ${ADMIN_LICENSE_KEY:-}
|
|
RUST_LOG: corrosion_api=info,tower_http=info
|
|
volumes:
|
|
- map_data:/data/maps
|
|
- backup_data:/data/backups
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
nats:
|
|
condition: service_started
|
|
ports:
|
|
- "8088:3000"
|
|
|
|
nginx:
|
|
build:
|
|
context: ../frontend
|
|
dockerfile: ../docker/Dockerfile.nginx
|
|
container_name: corrosion-nginx
|
|
ports:
|
|
- "8087:80"
|
|
volumes:
|
|
- ./nginx.conf:/etc/nginx/nginx.conf:ro
|
|
- map_data:/data/maps:ro
|
|
depends_on:
|
|
- api
|
|
|
|
volumes:
|
|
pg_data:
|
|
nats_data:
|
|
map_data:
|
|
backup_data:
|