Skip to main content

Docker Deployment

ACTS ML includes a production-ready Dockerfile with a multi-stage build that produces a lightweight Nginx container.

Prerequisites

  • Docker installed on your host machine
  • Access to your Directus API endpoint

Build the Image

docker build \
--build-arg VITE_DIRECTUS_URL=https://your-api.example.com/v1/api/d \
-t acts-ml .

The build process:

  1. Stage 1 (Build) — Installs dependencies and builds the Vue application with Vite
  2. Stage 2 (Serve) — Copies the built assets into a minimal Nginx image

Run the Container

docker run -d -p 80:80 acts-ml

The application will be available at http://localhost.

Environment Variables

Build-time arguments are baked into the application during the Docker build:

ArgumentRequiredDescription
VITE_DIRECTUS_URLYesDirectus API endpoint URL

Nginx Configuration

The included Nginx configuration handles:

  • Serving the built static assets
  • SPA routing (all routes fall back to index.html)
  • Proper MIME types and caching headers

Production Considerations

  • Use a reverse proxy (e.g., Traefik, Caddy) in front of the container for TLS termination
  • Set up health checks for container orchestration
  • Configure appropriate resource limits for your workload
  • Use environment-specific build arguments for staging vs. production