services:
  # Satisfactory server
  satisfactory_server:
    image: wolveix/satisfactory-server:latest
    container_name: satisfactory_server
    profiles:
      - satisfactory_server
    restart: on-failure:7
    ports:
      - 7777:7777/udp
      - 7777:7777/tcp
      - 8888:8888/tcp
    volumes:
      - satisfactory_server_config:/config
    networks:
      - satisfactory-network
    env_file:
      - ./env/satisfactory.env
    environment:
      - PUID=${PUID:-1000}
      - PGID=${PGID:-1000}
      - TZ=${TZ:-Europe/Paris}
    security_opt:
      - no-new-privileges:true
    healthcheck:
      test: bash /healthcheck.sh
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 120s
    cap_drop:
      - SYS_ADMIN

volumes:
  satisfactory_server_config:
    name: satisfactory_server_config

networks:
  satisfactory-network:
    driver: bridge
    name: satisfactory-network
