apicentric 0.1.1

Toolkit for building, recording, and sharing mock APIs
Documentation
version: '3.8'

services:
  apicentric-cloud:
    build:
      context: .
      dockerfile: packaging/Dockerfile
    ports:
      - "8080:8080"
    environment:
      - APICENTRIC_ENV=production
      - APICENTRIC_LOG_LEVEL=info
      - RUST_LOG=apicentric=info
      - APICENTRIC_DB_PATH=/app/data/apicentric.db
    volumes:
      # Mount directory for service definitions
      - ./services:/services:ro
      # Mount directory for logs (optional)
      - ./logs:/app/logs
      # Mount directory for persistent data
      - apicentric_data:/app/data
    healthcheck:
      test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8080/health"]
      timeout: 5s
      interval: 30s
      retries: 3
      start_period: 10s
    restart: unless-stopped

  # Optional: Add a reverse proxy like nginx
  nginx:
    image: nginx:alpine
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./nginx.conf:/etc/nginx/nginx.conf:ro
      # For SSL certificates
      - ./ssl:/etc/ssl/certs:ro
    depends_on:
      - apicentric-cloud
    restart: unless-stopped
    profiles:
      - production

volumes:
  # Persistent storage for application data
  apicentric_data:
    driver: local

networks:
  default:
    driver: bridge