version: "3.7"

services:
  app_proxy:
    environment:
      APP_HOST: arcane_arcane_1
      APP_PORT: 3552

  docker:
    image: docker:27.2.0-dind@sha256:f9f72ad901a78f27be922b2d320bbc263174f12919c1b37e6a01f828fa904565
    privileged: true
    network_mode: host
    stop_grace_period: 1m
    restart: on-failure
    environment:
      DOCKER_ENSURE_BRIDGE: "dind0:10.32.0.1/16"
    entrypoint: /entrypoint.sh
    command: >
      dockerd
        --bridge dind0
        --data-root /data/data
        --exec-root /data/exec
        --host unix:///data/docker.sock
        --pidfile /data/docker.pid
    volumes:
      - ${APP_DATA_DIR}/entrypoint.sh:/entrypoint.sh
      - ${APP_DATA_DIR}/data/docker:/data

  arcane:
    image: ghcr.io/getarcaneapp/arcane:v1.18.1@sha256:6d8a51ddca2399106ea20da9db17271a91dd97150cada449aba4edce2ae682c2
    depends_on:
      - docker
    restart: on-failure
    environment:
      APP_URL: http://${DEVICE_DOMAIN_NAME}:3552
      PUID: 1000
      PGID: 1000
      ENCRYPTION_KEY: ${APP_PASSWORD}
      JWT_SECRET: ${APP_PASSWORD}
    volumes:
      - ${APP_DATA_DIR}/data/app_data:/app/data
      - ${APP_DATA_DIR}/data/projects:/app/data/projects
      - ${APP_DATA_DIR}/data/docker:/var/run
