Remove Docker Compose configuration files and update deployment documentation for Coolify with Nixpacks
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
+25
-56
@@ -39,68 +39,37 @@ Describes:
|
||||
|
||||
## Infrastructure Level 2
|
||||
|
||||
### Docker Compose (Recommended for Development & Production)
|
||||
### Coolify with Nixpacks (Production)
|
||||
|
||||
All services are containerized and orchestrated with `docker compose`:
|
||||
Both services are deployed as separate Nixpacks resources in Coolify:
|
||||
|
||||
```text
|
||||
┌─────────────────────────────────────────────────────────────┐
|
||||
│ Docker Host / VM │
|
||||
│ ┌──────────────────────────────────────────────────────┐ │
|
||||
│ │ Docker Network: app-network (bridge) │ │
|
||||
│ │ ┌──────────────────────────────────────────────┐ │ │
|
||||
│ │ │ Backend Container (FastAPI) │ │ │
|
||||
│ │ │ - Port: 12015 │ │ │
|
||||
│ │ │ - Service Name: backend │ │ │
|
||||
│ │ │ - Volume Mount: /app/data ← host/data/ │ │ │
|
||||
│ │ ├──────────────────────────────────────────────┤ │ │
|
||||
│ │ │ Frontend Container (Flask) │ │ │
|
||||
│ │ │ - Port: 12016 │ │ │
|
||||
│ │ │ - Service Name: frontend │ │ │
|
||||
│ │ │ - Depends on: backend (health check) │ │ │
|
||||
│ │ ├──────────────────────────────────────────────┤ │ │
|
||||
│ │ │ Nginx Container (Reverse Proxy) │ │ │
|
||||
│ │ │ - Port: 80 (HTTP), 443 (HTTPS) │ │ │
|
||||
│ │ │ - Config: nginx/docker-compose.conf │ │ │
|
||||
│ │ │ - Routes: /api/* → backend:12015 │ │ │
|
||||
│ │ │ / → frontend:12016 │ │ │
|
||||
│ │ └──────────────────────────────────────────────┘ │ │
|
||||
│ └──────────────────────────────────────────────────────┘ │
|
||||
│ ▲ │
|
||||
│ Host Port Bindings │
|
||||
│ 80:80, 443:443, 12015:12015, 12016:12016 │
|
||||
└─────────────────────────────────────────────────────────────┘
|
||||
│
|
||||
Users / Internet
|
||||
┌──────────────────────────────────────────────────────────┐
|
||||
│ Coolify Server │
|
||||
│ ┌────────────────────────────┐ │
|
||||
│ │ Backend Service (FastAPI) │ │
|
||||
│ │ - Base Dir: /backend │ │
|
||||
│ │ - Port: 12015 │ │
|
||||
│ │ - Volume: /app/data │ │
|
||||
│ ├────────────────────────────┤ │
|
||||
│ │ Frontend Service (Flask) │ │
|
||||
│ │ - Base Dir: /frontend │ │
|
||||
│ │ - Port: 12016 (public) │ │
|
||||
│ │ - BACKEND_URL: :12015 │ │
|
||||
│ └────────────────────────────┘ │
|
||||
│ ▲ │
|
||||
│ Coolify reverse proxy (TLS termination) │
|
||||
└──────────────────────────────────────────────────────────┘
|
||||
│
|
||||
Users / Internet
|
||||
```
|
||||
|
||||
**Deployment Steps:**
|
||||
|
||||
1. Ensure Docker and Docker Compose are installed
|
||||
2. Create `.env` with required environment variables
|
||||
3. Run: `docker compose up --build`
|
||||
4. Access via browser at `http://localhost:12016` or through Nginx at `http://localhost:80`
|
||||
|
||||
**Benefits:**
|
||||
|
||||
- **Consistency**: Same containerized environment across development, testing, and production
|
||||
- **Simplicity**: Single command to start entire stack
|
||||
- **Portability**: Run on any system with Docker installed
|
||||
- **Persistence**: DuckDB data survives container restarts via volume mounts
|
||||
- **Networking**: Service names enable automatic DNS resolution (backend:12015, frontend:12016)
|
||||
- **Observability**: Easy logging with `docker compose logs`
|
||||
|
||||
**See**: [Docker Compose Deployment Guide](./deployment/docker-compose.md) for detailed instructions.
|
||||
|
||||
### Coolify (Alternative for Existing Deployments)
|
||||
|
||||
If using Coolify instead of Docker Compose:
|
||||
|
||||
1. **Recommended Path**: Deploy `docker-compose.coolify.yml` as one Coolify Docker Compose resource
|
||||
2. **Public Entry Point**: Route domain to `nginx` service on port 80; backend and frontend stay internal
|
||||
3. **Data Persistence**: Named volume keeps DuckDB data at `/app/data`
|
||||
4. **Fallback Path**: Use separate Nixpacks services only when one-stack Compose deploy is not suitable
|
||||
|
||||
**Note**: In Compose-based Coolify deployment, frontend reaches backend through Docker DNS at `http://backend:12015`. In Nixpacks-based deployment, use Coolify internal networking or colocate both services.
|
||||
1. Create backend Nixpacks service in Coolify with Base Directory `/backend`
|
||||
2. Create frontend Nixpacks service with Base Directory `/frontend`
|
||||
3. Set environment variables per service
|
||||
4. Attach domain to frontend on port `12016`
|
||||
5. Enable Auto HTTPS in Coolify
|
||||
|
||||
**See**: [Coolify Deployment Guide](./deployment/coolify.md) for detailed instructions.
|
||||
|
||||
Reference in New Issue
Block a user