version: '3.8'

services:
  reverse-proxy:
    build: .
    container_name: reverse-proxy-server
    ports:
      - "3000:3000"
    environment:
      - PORT=3000
      - NODE_ENV=production
    env_file:
      - .env
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "node", "-e", "require('http').get('http://localhost:3000', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})"]
      interval: 30s
      timeout: 3s
      retries: 3
      start_period: 5s
    networks:
      - proxy-network

networks:
  proxy-network:
    driver: bridge

