version: "3.7"

services:
  app_proxy:
    environment:
      APP_HOST: snowflake_web_1
      APP_PORT: 3800

  proxy:
    image: thetorproject/snowflake-proxy:v2.12.1@sha256:53658adcf8183ed387a8abce383536f45d72b4688638e078d6c1686970199feb
    restart: on-failure
    stop_grace_period: 1m
    command: "-log /data/snowflake.log -verbose"
    volumes:
      - ${APP_DATA_DIR}/data:/data

  web:
    image: sorenisanerd/gotty:v1.6.0@sha256:23b4669973e96d8d7d37b3bfd9e6566bdd701aa1a56eee2dc0e0362bd927ed88
    restart: on-failure
    stop_grace_period: 1m
    command: gotty --port 3800 --index "/snowflake/index.html" --title-format "Tor Snowflake Proxy" bash -c 'tail -n 10000 -f /snowflake/snowflake.log | grep "Traffic Relayed"'
    volumes:
      - ${APP_DATA_DIR}/data:/snowflake
