Skip to content

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.prod files 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.git

Step 2: Launch Stack

From each directory, run the production compose file:

bash
docker-compose -f docker-compose.prod.yml up -d

TIP

Use docker-compose logs -f to monitor the startup process and verify service health.


3. Infrastructure Management

ComponentPortDescription
API Backend8000The primary FastAPI service.
Scraper9000Automated port tracking service.
Flower5555Real-time monitoring for Celery tasks.
Traefik80/443Edge 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:

  1. Build: GitHub Actions builds the latest image.
  2. Push: Images are pushed to the container registry.
  3. Pull: The production server pulls the new image via pull_policy: always.

FreightFlow Platform Documentation