# ##############################################
# # DO NOT MODIFY the following lines without  #
# # understanding the consequences:            #
# # - ports (managed by gateway)               #
# # - userns_mode (required for permissions)   #
# # - resource limits (required for stability) #
# ##############################################

services:
  app:
    build: .
    container_name: ${PROJECT_NAME}-app
    restart: unless-stopped
    network_mode: bridge

    # DO NOT CHANGE - port is managed by gateway
    # Binds to Docker bridge so Caddy container can reach it
    ports:
      - "172.17.0.1:${PORT}:3000"

    environment:
      - NODE_ENV=production

    volumes:
      - ./data:/app/data

    # DO NOT REMOVE - required for server stability
    mem_limit: 1g
    cpus: 2.0
