Docker (Production)
Deploy Fluxgate to a VPS or cloud instance for production use with Docker Compose.
Server Requirements
- CPU: 2+ cores (4+ recommended)
- RAM: 4GB minimum (8GB+ recommended)
- Disk: 20GB+ SSD
- OS: Ubuntu 22.04 LTS, Debian 12, or Amazon Linux 2
- Network: Public IP with ports 80, 443 open
Deployment Steps
1
Set Up Server
SSH into your server and install Docker.
curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker $USER2
Clone and Configure
Clone the repo and set production environment variables.
git clone https://github.com/Anil175/fluxgate.git
cd fluxgate
cp .env.example .env
# Edit .env with production values3
Set Production Variables
Update .env with your domain, secure passwords, and API keys. See the Environment Variables page for the full list.
# Key variables to set:
# DATABASE_URL=postgresql://...
# SECRET_KEY=your-secure-random-key
# OPENAI_API_KEY=sk-...
# DOMAIN=your-domain.com4
Start Services
Launch all containers in detached mode.
docker compose up -d5
Run Migrations & Seed
Initialize the database.
docker compose exec api python -m shared.migrations.run
docker compose exec api python seed.py6
Set Up SSL (Optional)
Use a reverse proxy like Nginx or Caddy for HTTPS.
# With Caddy (auto-SSL):
# caddy reverse-proxy --from your-domain.com --to localhost:3000Security Checklist
Before going live: change default passwords, set a strong SECRET_KEY, configure firewall rules, enable SSL, and restrict database access to internal network only.