version: "3.9" services: # Bot API service bot-api: environment: TELEGRAM_WEB_APP_URL: https://${NGROK_DOMAIN} TELEGRAM_BOT_TOKEN: ${TELEGRAM_BOT_TOKEN} restart: on-failure build: context: ./api # Bot UI in development mode bot-ui: restart: on-failure volumes: - ./ui/src:/app/src - ./ui/public:/app/public - ./ui/index.html:/app/index.html - ./ui/vite.config.js:/app/vite.config.js build: context: ./ui dockerfile: dev.dockerfile # Nginx proxy to forward request to UI and API dev-proxy: image: nginx:stable-alpine environment: PORT: 3000 API_URL: http://bot-api:3000 UI_URL: http://bot-ui:3000 restart: on-failure volumes: - ./proxy.template:/etc/nginx/templates/default.conf.template # Ngrok service ngrok: image: ngrok/ngrok:alpine environment: NGROK_AUTHTOKEN: ${NGROK_AUTHTOKEN} restart: on-failure command: ["http", "--domain=${NGROK_DOMAIN}", "dev-proxy:3000", "--log=stdout"]