---
version: '3.7'
services:
  runner:
    build:
      context: runner/
    environment:
      CI_SERVER_URL: "${CI_SERVER_URL:-https://git.shore.co.il}"
      DOCKER_IMAGE: registry.shore.co.il/ci-images:docker
      DOCKER_NETWORK_MODE: &network gitlab-runner
      REGISTRATION_TOKEN: "${REGISTRATION_TOKEN}"
      RUNNER_NAME: "${RUNNER_NAME}"
      REGISTER_RUN_UNTAGGED: "${RUN_UNTAGGED:-true}"
      RUNNER_TAG_LIST: "${RUNNER_NAME}"
    image: registry.shore.co.il/gitlab-runner
    restart: always
    volumes:
      - "${BUILDS:-builds}:/builds"
      - config:/etc/gitlab-runner
      - /var/run/docker.sock:/var/run/docker.sock
  crond:
    build:
      context: crond/
    image: registry.shore.co.il/gitlab-runner-cron
    volumes:
      - /run/docker.sock:/run/docker.sock

volumes:
  builds:
  config:

networks:
  default:
    name: *network
