services:
  gitea:
    container_name: gitea
    image: gitea/gitea:1.25.2-rootless
    restart: always
    volumes:
      - ${GITEA_DATA_LOCATION}:/var/lib/gitea
      - ${GITEA_CONFIG_LOCATION}:/etc/gitea
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
    ports:
      - "3000:3000"
      - "2222:2222"
  gitea-runner:
    image: gitea/act_runner:0.3.0
    restart: always
    environment:
      CONFIG_FILE: /config.yaml
      GITEA_INSTANCE_URL: "${GITEA_INSTANCE_URL}"
      GITEA_RUNNER_REGISTRATION_TOKEN: "${REGISTRATION_TOKEN}"
      GITEA_RUNNER_NAME: "${RUNNER_NAME}"
    volumes:
      - ./runner-config.yaml:/config.yaml
      - ${GITEA_RUNNER_DATA_LOCATION}:/data
      - /var/run/docker.sock:/var/run/docker.sock
