Deployment & Operations
The FreightFlow stack is designed for secure, distributed deployment via Docker Compose behind a Traefik reverse proxy.
1. Production Setup Checklist
Before deploying, ensure you have the following prerequisites ready:
- [ ] Docker Engine and Compose installed.
- [ ] A public VM or dedicated server with fixed IP.
- [ ] Domains pointing to your server (e.g.,
api.domain.com). - [ ] Configured
.env.prodfiles in both backend and scraper directories.
2. Deploying the Microservices
Step 1: Clone Repositories
bash
git clone https://github.com/ldplogistics/freight-flow-backend.git
git clone https://github.com/ldplogistics/freight_flow_scraper.gitStep 2: Launch Stack
From each directory, run the production compose file:
bash
docker-compose -f docker-compose.prod.yml up -dTIP
Use docker-compose logs -f to monitor the startup process and verify service health.
3. Infrastructure Management
| Component | Port | Description |
|---|---|---|
| API Backend | 8000 | The primary FastAPI service. |
| Scraper | 9000 | Automated port tracking service. |
| Flower | 5555 | Real-time monitoring for Celery tasks. |
| Traefik | 80/443 | Edge router with SSL termination. |
IMPORTANT
SSL Configuration: Traefik automatically manages Let's Encrypt certificates based on your LETSENCRYPT_EMAIL variable. Ensure your server firewall allows traffic on ports 80 and 443.
CI/CD Pipeline
The platform supports a modern CI/CD workflow:
- Build: GitHub Actions builds the
latestimage. - Push: Images are pushed to the container registry.
- Pull: The production server pulls the new image via
pull_policy: always.
