services:
  forgejo-1:
    image: codeberg.org/forgejo/forgejo:15
    ports:
      - "13001:3000"
    environment:
      - FORGEJO__security__INSTALL_LOCK=true
      - FORGEJO__service__DISABLE_REGISTRATION=true
      - FORGEJO__server__ROOT_URL=http://localhost:13001
    volumes:
      - forgejo-1-data:/data
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:3000/api/v1/version"]
      interval: 5s
      timeout: 3s
      retries: 12
      start_period: 10s

  forgejo-2:
    image: codeberg.org/forgejo/forgejo:15
    ports:
      - "13002:3000"
    environment:
      - FORGEJO__security__INSTALL_LOCK=true
      - FORGEJO__service__DISABLE_REGISTRATION=true
      - FORGEJO__server__ROOT_URL=http://localhost:13002
    volumes:
      - forgejo-2-data:/data
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:3000/api/v1/version"]
      interval: 5s
      timeout: 3s
      retries: 12
      start_period: 10s

  forgejo-3:
    image: codeberg.org/forgejo/forgejo:15
    ports:
      - "13003:3000"
    environment:
      - FORGEJO__security__INSTALL_LOCK=true
      - FORGEJO__service__DISABLE_REGISTRATION=true
      - FORGEJO__server__ROOT_URL=http://localhost:13003
    volumes:
      - forgejo-3-data:/data
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:3000/api/v1/version"]
      interval: 5s
      timeout: 3s
      retries: 12
      start_period: 10s

volumes:
  forgejo-1-data:
  forgejo-2-data:
  forgejo-3-data:
