services:
  forgejo:
    image: codeberg.org/forgejo/forgejo:7
    container_name: food-market-forgejo
    restart: unless-stopped
    environment:
      USER_UID: "1000"
      USER_GID: "1000"
      FORGEJO__server__DOMAIN: git.zat.kz
      FORGEJO__server__ROOT_URL: https://git.zat.kz/
      FORGEJO__server__SSH_DOMAIN: git.zat.kz
      FORGEJO__server__SSH_PORT: "2222"
      FORGEJO__server__SSH_LISTEN_PORT: "22"
      FORGEJO__server__START_SSH_SERVER: "false"
      FORGEJO__server__DISABLE_SSH: "false"
      FORGEJO__service__DISABLE_REGISTRATION: "true"
      FORGEJO__service__REQUIRE_SIGNIN_VIEW: "false"
      FORGEJO__actions__ENABLED: "true"
      FORGEJO__database__DB_TYPE: sqlite3
      FORGEJO__log__LEVEL: Info
    volumes:
      - /opt/food-market-data/forgejo/data:/data
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    ports:
      - "127.0.0.1:3000:3000"  # HTTP, fronted by nginx on git.zat.kz
      - "2222:22"              # SSH for git clone/push via ssh://git@git.zat.kz:2222/...
