forked from InnoCoGo/Backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
83 lines (76 loc) · 1.96 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
version: '3.8'
services:
bot:
image: innocotravel/telegram-bot:main
# flask requires SIGINT to stop gracefully
# (default stop signal from Compose is SIGTERM)
stop_signal: SIGINT
ports:
- 8443:443
environment:
- TG_BOT_TOKEN=${TG_BOT_TOKEN}
- CERT_FILE=${CERT_FILE}
- PKEY_FILE=${PKEY_FILE}
- HOST=${HOST}
- TG_SECRET_TOKEN=${TG_SECRET_TOKEN}
- PORT=${PORT}
- BACKEND_SECRET_TOKEN=${BACKEND_SECRET_TOKEN}
- BACKEND_URL=${BACKEND_URL}
- PERSISTENT_FOLDER=${PERSISTENT_FOLDER}
volumes:
- /root/innocotravel:/root/innocotravel
networks:
- innocogo
server:
image: innocotravel/backend:master
container_name: "inno-cotravel-be"
build: ./
volumes:
- inno-cotravel-be-vol:/root/
ports:
- 8000:8000
environment:
- DB_PASSWORD=${DB_PASSWORD}
- DB_HOST=${DB_HOST}
- DB_PORT=${DB_PORT}
- BOT_TOKEN=${BOT_TOKEN}
- TG_BOT_URL=${TG_BOT_URL}
- BACKEND_SECRET_TOKEN=${BACKEND_SECRET_TOKEN}
- TRANSLATE_URL=${TRANSLATE_URL}
- TRANSLATE_API_KEY=
- KAFKA_TOPIC=go-chat-message
- KAFKA_HOSTS=kafka:9092
depends_on:
- db
networks:
- innocogo
db:
restart: always
image: postgres:latest
environment:
- POSTGRES_PASSWORD=${DB_PASSWORD}
ports:
- 127.0.0.1:5432:5432
networks:
- innocogo
zookeeper:
image: zookeeper
ports:
- 2181:2181
kafka:
image: wurstmeister/kafka
ports:
- 9092:9092
environment:
KAFKA_BROKER_ID: 0
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://192.168.56.1:9092 # bridge ip to vm container
KAFKA_CREATE_TOPICS: "go-chat-message:2:0" # topic:partitions:replicas
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092
depends_on:
- zookeeper
volumes:
inno-cotravel-be-vol:
networks:
innocogo:
external: true