services:
  linktree:
    build: .
    ports:
      - "8080:8080"
    volumes:
      - ./links.toml:/app/links:ro
    environment:
      - NODE_ENV=production
    restart: unless-stopped

  # Optional: nginx proxy for production
  nginx:
    image: nginx:alpine
    ports:
      - "80:80"
    volumes:
      - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
    depends_on:
      - preact-linktree
    restart: unless-stopped
    profiles:
      - production
