-
Notifications
You must be signed in to change notification settings - Fork 7
/
docker-compose.yml
43 lines (38 loc) · 1.02 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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"]