Operations¶
Guides for deploying, configuring, and maintaining Genji Shimada in production and development environments.
Overview¶
This section covers:
- Infrastructure - PostgreSQL, RabbitMQ, and cloud services
- Docker Compose - Local and production deployments
- Backups - Nightly prod backups and weekly dev refresh
- Configuration - Environment variables and config files
- Reverse Proxy - Caddy routing, domains, and TLS
- Identity & Auth - Keycloak and oauth2-proxy
- Cloudflare - DNS and CDN configuration
- Monitoring - Grafana Alloy stack and dashboards
Quick Links¶
-
Infrastructure
Learn about the services that power Genji Shimada
-
Docker Compose
Deploy with Docker for development and production
-
Reverse Proxy
Caddy routing and Cloudflare TLS automation
-
Backups & Dev Refresh
Nightly prod backups and weekly dev refresh workflows
-
Monitoring
Set up Grafana Alloy, dashboards, and log collection
-
Identity & Auth
Keycloak and oauth2-proxy configuration
-
Cloudflare
DNS, CDN, and R2 configuration
Environment Configuration¶
Create a .env file in the repo root with the variables required by your services. At minimum:
APP_ENVIRONMENT=development
DISCORD_TOKEN=your_bot_token
POSTGRES_USER=genjishimada
POSTGRES_PASSWORD=secure_password
POSTGRES_DB=genjishimada
RABBITMQ_USER=admin
RABBITMQ_PASS=secure_password
RABBITMQ_HOST=localhost
API_KEY=secure_api_key_for_bot
Add optional values for Sentry, R2, and Resend as needed.
If you run the API/bot in Docker, set RABBITMQ_HOST to the service name (genjishimada-rabbitmq-dev or genjishimada-rabbitmq).
Health Checks¶
API Health Check¶
Local development:
Remote deployments: Access through your reverse proxy or internal Docker network.
Database Health¶
Local development:
Remote staging:
Remote production:
RabbitMQ Health¶
Local development: Access management UI at http://localhost:15672
Remote deployments: Use container logs or your reverse proxy setup.
Next Steps¶
- Infrastructure Details - Deep dive into services
- Docker Compose Guide - Deployment strategies
- Bot Configuration - Bot-specific config