# Note: This file is only used for Atlantis local development
services:
  ngrok:
    image: ngrok/ngrok:latest@sha256:1dae5be9a74825c44ab9c89be047e18b7b71ce5ce4453cabfcfec2e541e67b14
    ports:
      - 4040:4040
    command:
      - "http"
      - "atlantis:4141"
    env_file:
      - atlantis.env
    depends_on:
      - atlantis
  redis:
    image: redis:7.4-alpine@sha256:bb186d083732f669da90be8b0f975a37812b15e913465bb14d845db72a4e3e08
    restart: always
    ports:
      - 6379:6379
    command: redis-server --save 20 1 --loglevel warning --requirepass test123
    volumes:
      - redis:/data
  atlantis:
    depends_on:
      - redis
    build:
      context: .
      dockerfile: Dockerfile.dev
    ports:
      - 4141:4141
    volumes:
      - ${HOME}/.ssh:/.ssh:ro
      - ${PWD}:/atlantis/src:ro
    # Contains the flags that atlantis uses in env var form
    env_file:
      - atlantis.env

volumes:
  redis:
    driver: local
