# WARNING!
# This is a development version of THE Appwrite docker-compose.yml file.
# Avoid using this file in your production environment.
# We're exposing here sensitive ports and mounting code volumes for rapid development and debugging of the server stack.

x-logging: &x-logging
  logging:
    driver: 'json-file'
    options:
      max-file: '5'
      max-size: '10m'

x-env-storage: &x-env-storage |-
  _APP_STORAGE_DEVICE
  _APP_STORAGE_S3_ACCESS_KEY
  _APP_STORAGE_S3_SECRET
  _APP_STORAGE_S3_REGION
  _APP_STORAGE_S3_BUCKET
  _APP_STORAGE_DO_SPACES_ACCESS_KEY
  _APP_STORAGE_DO_SPACES_SECRET
  _APP_STORAGE_DO_SPACES_REGION
  _APP_STORAGE_DO_SPACES_BUCKET
  _APP_STORAGE_BACKBLAZE_ACCESS_KEY
  _APP_STORAGE_BACKBLAZE_SECRET
  _APP_STORAGE_BACKBLAZE_REGION
  _APP_STORAGE_BACKBLAZE_BUCKET
  _APP_STORAGE_DO_SPACES_BUCKET
  _APP_STORAGE_LINODE_ACCESS_KEY
  _APP_STORAGE_LINODE_SECRET
  _APP_STORAGE_LINODE_REGION
  _APP_STORAGE_LINODE_BUCKET
  _APP_STORAGE_WASABI_ACCESS_KEY
  _APP_STORAGE_WASABI_SECRET
  _APP_STORAGE_WASABI_REGION
  _APP_STORAGE_WASABI_BUCKET

version: '3'

services:
  traefik:
    image: traefik:2.7
    <<: *x-logging
    container_name: appwrite-traefik
    command:
      - --log.level=DEBUG
      - --api.insecure=true
      - --providers.file.directory=/storage/config
      - --providers.file.watch=true
      - --providers.docker=true
      - --providers.docker.exposedByDefault=false
      - --providers.docker.constraints=Label(`traefik.constraint-label-stack`,`appwrite`)
      - --entrypoints.appwrite_web.address=:80
      - --entrypoints.appwrite_websecure.address=:443
      - --accesslog=true
    ports:
      - 80:80
      - 8080:80
      - 443:443
      - 9500:8080
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - appwrite-config:/storage/config:ro
      - appwrite-certificates:/storage/certificates:ro
    depends_on:
      - appwrite
    networks:
      - gateway
      - appwrite

  appwrite:
    container_name: appwrite
    <<: *x-logging
    build:
      context: .
      args:
        - DEBUG=false
        - TESTING=true
        - VERSION=dev
    ports: 
      - 9501:80
    networks:
      - appwrite
    labels:
      - "traefik.enable=true"
      - "traefik.constraint-label-stack=appwrite"
      - "traefik.docker.network=appwrite"
      - "traefik.http.services.appwrite_api.loadbalancer.server.port=80"
      #http
      - traefik.http.routers.appwrite_api_http.entrypoints=appwrite_web
      - traefik.http.routers.appwrite_api_http.rule=PathPrefix(`/`)
      - traefik.http.routers.appwrite_api_http.service=appwrite_api
      # https
      - traefik.http.routers.appwrite_api_https.entrypoints=appwrite_websecure
      - traefik.http.routers.appwrite_api_https.rule=PathPrefix(`/`)
      - traefik.http.routers.appwrite_api_https.service=appwrite_api
      - traefik.http.routers.appwrite_api_https.tls=true
    volumes:
      - appwrite-uploads:/storage/uploads:rw
      - appwrite-cache:/storage/cache:rw
      - appwrite-config:/storage/config:rw
      - appwrite-certificates:/storage/certificates:rw
      - appwrite-functions:/storage/functions:rw
      - ./phpunit.xml:/usr/src/code/phpunit.xml
      - ./psalm.xml:/usr/src/code/psalm.xml
      - ./tests:/usr/src/code/tests
      - ./app:/usr/src/code/app
      # - ./vendor:/usr/src/code/vendor
      - ./docs:/usr/src/code/docs
      - ./public:/usr/src/code/public
      - ./src:/usr/src/code/src
      # - ./debug:/tmp
      - ./dev:/usr/local/dev
    depends_on:
      - mariadb
      - redis
      # - clamav
    entrypoint: 
      - php
      - -e
      - app/http.php
      - -dopcache.preload=opcache.preload=/usr/src/code/app/preload.php
    environment:
      - _APP_ENV
      - _APP_WORKER_PER_CORE
      - _APP_LOCALE
      - _APP_CONSOLE_WHITELIST_ROOT
      - _APP_CONSOLE_WHITELIST_EMAILS
      - _APP_CONSOLE_WHITELIST_IPS
      - _APP_SYSTEM_EMAIL_NAME
      - _APP_SYSTEM_EMAIL_ADDRESS
      - _APP_SYSTEM_SECURITY_EMAIL_ADDRESS
      - _APP_SYSTEM_RESPONSE_FORMAT
      - _APP_OPTIONS_ABUSE
      - _APP_OPTIONS_FORCE_HTTPS
      - _APP_OPENSSL_KEY_V1
      - _APP_DOMAIN
      - _APP_DOMAIN_TARGET
      - _APP_REDIS_HOST
      - _APP_REDIS_PORT
      - _APP_REDIS_USER
      - _APP_REDIS_PASS
      - _APP_DB_HOST
      - _APP_DB_PORT
      - _APP_DB_SCHEMA
      - _APP_DB_USER
      - _APP_DB_PASS
      - _APP_SMTP_HOST
      - _APP_SMTP_PORT
      - _APP_SMTP_SECURE
      - _APP_SMTP_USERNAME
      - _APP_SMTP_PASSWORD
      - _APP_USAGE_STATS
      - _APP_INFLUXDB_HOST
      - _APP_INFLUXDB_PORT
      - _APP_STORAGE_LIMIT
      - _APP_STORAGE_PREVIEW_LIMIT
      - _APP_STORAGE_ANTIVIRUS
      - _APP_STORAGE_ANTIVIRUS_HOST
      - _APP_STORAGE_ANTIVIRUS_PORT
      - *x-env-storage
      - _APP_FUNCTIONS_SIZE_LIMIT
      - _APP_FUNCTIONS_TIMEOUT
      - _APP_FUNCTIONS_BUILD_TIMEOUT
      - _APP_FUNCTIONS_CONTAINERS
      - _APP_FUNCTIONS_CPUS
      - _APP_FUNCTIONS_MEMORY
      - _APP_FUNCTIONS_MEMORY_SWAP
      - _APP_FUNCTIONS_RUNTIMES
      - _APP_EXECUTOR_SECRET
      - _APP_EXECUTOR_HOST
      - _APP_LOGGING_PROVIDER
      - _APP_LOGGING_CONFIG
      - _APP_STATSD_HOST
      - _APP_STATSD_PORT
      - _APP_MAINTENANCE_INTERVAL
      - _APP_MAINTENANCE_RETENTION_EXECUTION
      - _APP_MAINTENANCE_RETENTION_ABUSE
      - _APP_MAINTENANCE_RETENTION_AUDIT

  appwrite-realtime:
    entrypoint: realtime
    <<: *x-logging
    container_name: appwrite-realtime
    build:
      context: .
    restart: unless-stopped
    ports: 
      - 9505:80
    labels:
      - "traefik.enable=true"
      - "traefik.constraint-label-stack=appwrite"
      - "traefik.docker.network=appwrite"
      - "traefik.http.services.appwrite_realtime.loadbalancer.server.port=80"
      #ws
      - traefik.http.routers.appwrite_realtime_ws.entrypoints=appwrite_web
      - traefik.http.routers.appwrite_realtime_ws.rule=PathPrefix(`/v1/realtime`)
      - traefik.http.routers.appwrite_realtime_ws.service=appwrite_realtime
      # wss
      - traefik.http.routers.appwrite_realtime_wss.entrypoints=appwrite_websecure
      - traefik.http.routers.appwrite_realtime_wss.rule=PathPrefix(`/v1/realtime`)
      - traefik.http.routers.appwrite_realtime_wss.service=appwrite_realtime
      - traefik.http.routers.appwrite_realtime_wss.tls=true
      - traefik.http.routers.appwrite_realtime_wss.tls.certresolver=dns
    networks:
      - appwrite
    volumes:
      - ./app:/usr/src/code/app
      - ./src:/usr/src/code/src
      # - ./vendor:/usr/src/code/vendor
    depends_on:
      - mariadb
      - redis
    environment:
      - _APP_ENV
      - _APP_WORKER_PER_CORE
      - _APP_OPTIONS_ABUSE
      - _APP_OPENSSL_KEY_V1
      - _APP_REDIS_HOST
      - _APP_REDIS_PORT
      - _APP_DB_HOST
      - _APP_DB_PORT
      - _APP_DB_SCHEMA
      - _APP_DB_USER
      - _APP_DB_PASS
      - _APP_USAGE_STATS
      - _APP_LOGGING_PROVIDER
      - _APP_LOGGING_CONFIG

  appwrite-worker-audits:
    entrypoint: worker-audits
    <<: *x-logging
    container_name: appwrite-worker-audits
    build:
      context: .
    networks:
      - appwrite
    volumes:
      - ./app:/usr/src/code/app
      - ./src:/usr/src/code/src
    depends_on:
      - redis
      - mariadb
    environment:
      - _APP_ENV
      - _APP_OPENSSL_KEY_V1
      - _APP_REDIS_HOST
      - _APP_REDIS_PORT
      - _APP_REDIS_USER
      - _APP_REDIS_PASS
      - _APP_DB_HOST
      - _APP_DB_PORT
      - _APP_DB_SCHEMA
      - _APP_DB_USER
      - _APP_DB_PASS
      - _APP_LOGGING_PROVIDER
      - _APP_LOGGING_CONFIG

  appwrite-worker-webhooks:
    entrypoint: worker-webhooks
    <<: *x-logging
    container_name: appwrite-worker-webhooks
    build:
      context: .
    networks:
      - appwrite
    volumes:
      - ./app:/usr/src/code/app
      - ./src:/usr/src/code/src
    depends_on:
      - redis
      - mariadb
      - request-catcher
    environment:
      - _APP_ENV
      - _APP_OPENSSL_KEY_V1
      - _APP_SYSTEM_SECURITY_EMAIL_ADDRESS
      - _APP_REDIS_HOST
      - _APP_REDIS_PORT
      - _APP_REDIS_USER
      - _APP_REDIS_PASS
      - _APP_LOGGING_PROVIDER
      - _APP_LOGGING_CONFIG

  appwrite-worker-deletes:
    entrypoint: worker-deletes
    <<: *x-logging
    container_name: appwrite-worker-deletes
    build:
      context: .
    networks:
      - appwrite
    depends_on:
      - redis
      - mariadb
    volumes: 
      - appwrite-uploads:/storage/uploads:rw
      - appwrite-cache:/storage/cache:rw
      - appwrite-functions:/storage/functions:rw
      - appwrite-builds:/storage/builds:rw
      - appwrite-certificates:/storage/certificates:rw
      - ./app:/usr/src/code/app
      - ./src:/usr/src/code/src
    environment:
      - _APP_ENV
      - _APP_OPENSSL_KEY_V1
      - _APP_REDIS_HOST
      - _APP_REDIS_PORT
      - _APP_REDIS_USER
      - _APP_REDIS_PASS
      - _APP_DB_HOST
      - _APP_DB_PORT
      - _APP_DB_SCHEMA
      - _APP_DB_USER
      - _APP_DB_PASS
      - *x-env-storage
      - _APP_LOGGING_PROVIDER
      - _APP_LOGGING_CONFIG
      - _APP_EXECUTOR_SECRET
      - _APP_EXECUTOR_HOST

  appwrite-worker-database:
    entrypoint: worker-database
    <<: *x-logging
    container_name: appwrite-worker-database
    build:
      context: .
    networks:
      - appwrite
    volumes: 
      - ./app:/usr/src/code/app
      - ./src:/usr/src/code/src
      # - ./vendor/utopia-php/database:/usr/src/code/vendor/utopia-php/database
    depends_on:
      - redis
      - mariadb
    environment:
      - _APP_ENV
      - _APP_OPENSSL_KEY_V1
      - _APP_REDIS_HOST
      - _APP_REDIS_PORT
      - _APP_REDIS_USER
      - _APP_REDIS_PASS
      - _APP_DB_HOST
      - _APP_DB_PORT
      - _APP_DB_SCHEMA
      - _APP_DB_USER
      - _APP_DB_PASS
      - _APP_LOGGING_PROVIDER
      - _APP_LOGGING_CONFIG

  appwrite-worker-builds:
    entrypoint: worker-builds
    <<: *x-logging
    container_name: appwrite-worker-builds
    build:
      context: .
    networks:
      - appwrite
    volumes: 
      - ./app:/usr/src/code/app
      - ./src:/usr/src/code/src
    depends_on:
      - redis
      - mariadb
    environment:
      - _APP_ENV
      - _APP_OPENSSL_KEY_V1
      - _APP_EXECUTOR_SECRET
      - _APP_EXECUTOR_HOST
      - _APP_REDIS_HOST
      - _APP_REDIS_PORT
      - _APP_REDIS_USER
      - _APP_REDIS_PASS
      - _APP_DB_HOST
      - _APP_DB_PORT
      - _APP_DB_SCHEMA
      - _APP_DB_USER
      - _APP_DB_PASS
      - _APP_LOGGING_PROVIDER
      - _APP_LOGGING_CONFIG

  appwrite-worker-certificates:
    entrypoint: worker-certificates
    <<: *x-logging
    container_name: appwrite-worker-certificates
    build:
      context: .
    networks:
      - appwrite
    depends_on:
      - redis
      - mariadb
    volumes: 
      - appwrite-config:/storage/config:rw
      - appwrite-certificates:/storage/certificates:rw
      - ./app:/usr/src/code/app
      - ./src:/usr/src/code/src
    environment:
      - _APP_ENV
      - _APP_OPENSSL_KEY_V1
      - _APP_DOMAIN
      - _APP_DOMAIN_TARGET
      - _APP_SYSTEM_SECURITY_EMAIL_ADDRESS
      - _APP_REDIS_HOST
      - _APP_REDIS_PORT
      - _APP_REDIS_USER
      - _APP_REDIS_PASS
      - _APP_DB_HOST
      - _APP_DB_PORT
      - _APP_DB_SCHEMA
      - _APP_DB_USER
      - _APP_DB_PASS
      - _APP_LOGGING_PROVIDER
      - _APP_LOGGING_CONFIG

  appwrite-worker-functions:
    entrypoint: worker-functions
    <<: *x-logging
    container_name: appwrite-worker-functions
    build:
      context: .
    networks:
      - appwrite
    volumes:
      - ./app:/usr/src/code/app
      - ./src:/usr/src/code/src
    depends_on:
      - redis
      - mariadb
      - appwrite-executor
    environment:
      - _APP_ENV
      - _APP_OPENSSL_KEY_V1
      - _APP_REDIS_HOST
      - _APP_REDIS_PORT
      - _APP_REDIS_USER
      - _APP_REDIS_PASS
      - _APP_DB_HOST
      - _APP_DB_PORT
      - _APP_DB_SCHEMA
      - _APP_DB_USER
      - _APP_DB_PASS
      - _APP_FUNCTIONS_TIMEOUT
      - _APP_EXECUTOR_SECRET
      - _APP_EXECUTOR_HOST
      - _APP_USAGE_STATS
      - DOCKERHUB_PULL_USERNAME
      - DOCKERHUB_PULL_PASSWORD

  appwrite-executor:
    container_name: appwrite-executor
    <<: *x-logging
    entrypoint: executor
    stop_signal: SIGINT
    build:
      context: .
      args: 
        - DEBUG=false
        - TESTING=true
        - VERSION=dev
    networks:
      appwrite:
      runtimes:
    ports:
      - 9519:80
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - ./app:/usr/src/code/app
      - ./src:/usr/src/code/src
      - appwrite-functions:/storage/functions:rw
      - appwrite-builds:/storage/builds:rw
      - /tmp:/tmp:rw
    depends_on:
      - redis
      - mariadb
      - appwrite
    environment:
      - _APP_ENV
      - _APP_VERSION
      - _APP_FUNCTIONS_TIMEOUT
      - _APP_FUNCTIONS_BUILD_TIMEOUT
      - _APP_FUNCTIONS_CONTAINERS
      - _APP_FUNCTIONS_RUNTIMES
      - _APP_FUNCTIONS_CPUS
      - _APP_FUNCTIONS_MEMORY
      - _APP_FUNCTIONS_MEMORY_SWAP
      - _APP_FUNCTIONS_INACTIVE_THRESHOLD
      - _APP_EXECUTOR_SECRET
      - OPEN_RUNTIMES_NETWORK
      - _APP_LOGGING_PROVIDER
      - _APP_LOGGING_CONFIG
      - *x-env-storage
      - DOCKERHUB_PULL_USERNAME
      - DOCKERHUB_PULL_PASSWORD

  appwrite-worker-mails:
    entrypoint: worker-mails
    <<: *x-logging
    container_name: appwrite-worker-mails
    build:
      context: .
    networks:
      - appwrite
    volumes:
      - ./app:/usr/src/code/app
      - ./src:/usr/src/code/src
    depends_on:
      - redis
      - maildev
      # - smtp
    environment:
      - _APP_ENV
      - _APP_OPENSSL_KEY_V1
      - _APP_SYSTEM_EMAIL_NAME
      - _APP_SYSTEM_EMAIL_ADDRESS
      - _APP_REDIS_HOST
      - _APP_REDIS_PORT
      - _APP_REDIS_USER
      - _APP_REDIS_PASS
      - _APP_SMTP_HOST
      - _APP_SMTP_PORT
      - _APP_SMTP_SECURE
      - _APP_SMTP_USERNAME
      - _APP_SMTP_PASSWORD
      - _APP_LOGGING_PROVIDER
      - _APP_LOGGING_CONFIG

  appwrite-maintenance:
    entrypoint: maintenance
    <<: *x-logging
    container_name: appwrite-maintenance
    build:
      context: .
    networks:
      - appwrite
    volumes:
      - ./app:/usr/src/code/app
      - ./src:/usr/src/code/src
    depends_on:
      - redis
    environment:
      - _APP_ENV
      - _APP_DOMAIN
      - _APP_DOMAIN_TARGET
      - _APP_OPENSSL_KEY_V1
      - _APP_REDIS_HOST
      - _APP_REDIS_PORT
      - _APP_REDIS_USER
      - _APP_REDIS_PASS
      - _APP_DB_HOST
      - _APP_DB_PORT
      - _APP_DB_SCHEMA
      - _APP_DB_USER
      - _APP_DB_PASS
      - _APP_MAINTENANCE_INTERVAL
      - _APP_MAINTENANCE_RETENTION_EXECUTION
      - _APP_MAINTENANCE_RETENTION_ABUSE
      - _APP_MAINTENANCE_RETENTION_AUDIT

  appwrite-usage:
    entrypoint: usage
    <<: *x-logging
    container_name: appwrite-usage
    build:
      context: .
      args:
        - DEBUG=false
    networks:
      - appwrite
    volumes:
      - ./app:/usr/src/code/app
      - ./src:/usr/src/code/src
      - ./dev:/usr/local/dev
    depends_on:
      - influxdb
      - mariadb
    environment:
      - _APP_ENV
      - _APP_OPENSSL_KEY_V1
      - _APP_DB_HOST
      - _APP_DB_PORT
      - _APP_DB_SCHEMA
      - _APP_DB_USER
      - _APP_DB_PASS
      - _APP_INFLUXDB_HOST
      - _APP_INFLUXDB_PORT
      - _APP_USAGE_AGGREGATION_INTERVAL
      - _APP_REDIS_HOST
      - _APP_REDIS_PORT
      - _APP_REDIS_USER
      - _APP_REDIS_PASS

  appwrite-schedule:
    entrypoint: schedule
    <<: *x-logging
    container_name: appwrite-schedule
    build:
      context: .
    networks:
      - appwrite
    volumes:
      - ./app:/usr/src/code/app
      - ./src:/usr/src/code/src
    depends_on:
      - redis
    environment:
      - _APP_ENV
      - _APP_REDIS_HOST
      - _APP_REDIS_PORT
      - _APP_REDIS_USER
      - _APP_REDIS_PASS

  mariadb:
    image: mariadb:10.7 # fix issues when upgrading using: mysql_upgrade -u root -p
    container_name: appwrite-mariadb
    <<: *x-logging
    networks:
      - appwrite
    volumes:
      - appwrite-mariadb:/var/lib/mysql:rw
    ports:
      - "3306:3306"
    environment:
      - MYSQL_ROOT_PASSWORD=${_APP_DB_ROOT_PASS}
      - MYSQL_DATABASE=${_APP_DB_SCHEMA}
      - MYSQL_USER=${_APP_DB_USER}
      - MYSQL_PASSWORD=${_APP_DB_PASS}
    command: 'mysqld --innodb-flush-method=fsync' # add ' --query_cache_size=0' for DB tests
    # command: mv /var/lib/mysql/ib_logfile0 /var/lib/mysql/ib_logfile0.bu && mv /var/lib/mysql/ib_logfile1 /var/lib/mysql/ib_logfile1.bu

  # smtp:
  #   image: appwrite/smtp:1.2.0
  #   container_name: appwrite-smtp
  #   restart: unless-stopped
  #   networks:
  #     - appwrite
  #   environment:
  #     - LOCAL_DOMAINS=@
  #     - RELAY_FROM_HOSTS=192.168.0.0/16 ; *.yourdomain.com
  #     - SMARTHOST_HOST=smtp
  #     - SMARTHOST_PORT=587
  
  redis:
    image: redis:6.2-alpine
    <<: *x-logging
    container_name: appwrite-redis
    ports:
      - "6379:6379"
    networks:
      - appwrite
    volumes:
      - appwrite-redis:/data:rw

  # clamav:
  #   image: appwrite/clamav:1.2.0
  #   container_name: appwrite-clamav
  #   networks:
  #     - appwrite
  #   volumes:
  #     - appwrite-uploads:/storage/uploads

  influxdb:
    image: appwrite/influxdb:1.5.0
    container_name: appwrite-influxdb
    <<: *x-logging
    networks:
      - appwrite
    volumes:
      - appwrite-influxdb:/var/lib/influxdb:rw

  telegraf:
    image: appwrite/telegraf:1.4.0
    container_name: appwrite-telegraf
    <<: *x-logging
    networks:
      - appwrite
    environment: 
      - _APP_INFLUXDB_HOST
      - _APP_INFLUXDB_PORT

  # Dev Tools Start ------------------------------------------------------------------------------------------
  # 
  # The Appwrite Team uses the following tools to help debug, monitor and diagnose the Appwrite stack
  #
  # Here is a description of the different tools and why are we using them:
  #
  # MailCatcher - An SMTP server. Catches all system emails and displays them in a nice UI.
  # RequestCatcher - An HTTP server. Catches all system https calls and displays them using a simple HTTP API. Used to debug & tests webhooks and HTTP tasks
  # RedisCommander - A nice UI for exploring Redis data
  # Resque - A nice UI for exploring Reddis pub/sub, view the different queues workloads, pending and failed tasks
  # Chronograf - A nice UI for exploring InfluxDB data
  # Webgrind - A nice UI for exploring and debugging code-level stuff

  maildev: # used mainly for dev tests
    image: appwrite/mailcatcher:1.0.0
    container_name: appwrite-mailcatcher
    <<: *x-logging
    ports:
      - '9503:1080'
    networks:
      - appwrite

  request-catcher: # used mainly for dev tests
    image: appwrite/requestcatcher:1.0.0
    container_name: appwrite-requestcatcher
    <<: *x-logging
    ports:
      - '9504:5000'
    networks:
      - appwrite

  adminer:
    image: adminer
    container_name: appwrite-adminer
    <<: *x-logging
    restart: always
    ports:
      - 9506:8080
    networks:
      - appwrite

  # redis-commander:
  #   image: rediscommander/redis-commander:latest
  #   restart: unless-stopped
  #   networks:
  #   - appwrite
  #   environment:
  #   - REDIS_HOSTS=redis
  #   ports:
  #   - "8081:8081"

  # resque:
  #   image: appwrite/resque-web:1.1.0
  #   restart: unless-stopped
  #   networks:
  #     - appwrite
  #   ports:
  #     - "5678:5678"
  #   environment:
  #     - RESQUE_WEB_HOST=redis
  #     - RESQUE_WEB_PORT=6379
  #     - RESQUE_WEB_HTTP_BASIC_AUTH_USER=user
  #     - RESQUE_WEB_HTTP_BASIC_AUTH_PASSWORD=password

  # chronograf:
  #   image: chronograf:1.6
  #   container_name: appwrite-chronograf
  #   restart: unless-stopped
  #   networks:
  #   - appwrite
  #   volumes:
  #   - appwrite-chronograf:/var/lib/chronograf
  #   ports:
  #   - "8888:8888"
  #   environment:
  #   - INFLUXDB_URL=http://influxdb:8086
  #   - KAPACITOR_URL=http://kapacitor:9092
  #   - AUTH_DURATION=48h
  #   - TOKEN_SECRET=duperduper5674829!jwt
  #   - GH_CLIENT_ID=d86f7145a41eacfc52cc
  #   - GH_CLIENT_SECRET=9e0081062367a2134e7f2ea95ba1a32d08b6c8ab
  #   - GH_ORGS=appwrite

  # webgrind:
  #   image: 'jokkedk/webgrind:latest'
  #   volumes:
  #     - './debug:/tmp'
  #   ports:
  #     - '3001:80'
  
  # Dev Tools End   ------------------------------------------------------------------------------------------

networks:
  gateway:
  appwrite:
  runtimes:

volumes:
  appwrite-mariadb:
  appwrite-redis:
  appwrite-cache:
  appwrite-uploads:
  appwrite-certificates:
  appwrite-functions:
  appwrite-builds:
  appwrite-influxdb:
  appwrite-config:
  appwrite-executor:
  # appwrite-chronograf:
