forked from adityathebe/telegramForwarder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
44 lines (41 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
44
version: '3.1'
services:
node-bot:
build: ./bot
restart: always
image: telegram-forwarder-node-bot
environment:
AGENT_PORT: 3000
AGENT_HOSTNAME: python-agent
TG_API_KEY: '${TG_API_KEY}'
TG_BOT_USERNAME: '${TG_BOT_USERNAME}'
DB_HOST: postgres-db
NTBA_FIX_319: 1
depends_on:
- postgres-db
command: ["./wait-for.sh", "postgres-db:5432", "--", "node", "bot.js"]
python-agent:
build: './agent'
restart: always
image: 'telegram-forwarder-python-agent'
depends_on:
- postgres-db
- node-bot
environment:
API_PORT: 3000
TG_API_ID: '${TG_API_ID}'
TG_HASH_ID: '${TG_HASH_ID}'
DB_HOST: postgres-db
ports:
- '3000:3000'
volumes:
- './agent/session:/telegram-python-agent/session'
postgres-db:
image: postgres:alpine
environment:
POSTGRES_PASSWORD: mysecretpassword
POSTGRES_DB: telegram
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
ports:
- '5432:5432'