-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathdocker-compose.yml
78 lines (74 loc) · 2.17 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
services:
caddy:
image: lucaslorentz/caddy-docker-proxy:2.9.1-alpine
ports:
- 80:80
- 443:443
environment:
- CADDY_INGRESS_NETWORKS=caddy
networks:
- caddy
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./caddy/caddy_data:/data
restart: unless-stopped
extra_hosts:
- "host.docker.internal:host-gateway"
bot:
build:
context: .
container_name: 'AiogramShopBot'
environment:
WEBHOOK_PATH: "/"
WEBAPP_HOST: "0.0.0.0" # Don't touch this
WEBAPP_PORT: 5000 # Here your port
TOKEN: "1234567890:QWER.....TYI" # Here your bot token from botfather
NGROK_TOKEN: 'NGROK_TOKEN_HERE' # Here your ngrok token from ngrok.com
ADMIN_ID_LIST: "12345678,87654321" # Telegram ID's for admins;
SUPPORT_LINK: "https://t.me/YourUsername"
DB_NAME: "database.db" # Here your database name
DB_ENCRYPTION: "false" # DB encryption option
DB_PASS: "1234567890" # Here your database password (Required only if DB_ENCRYPTION-"true”)
PAGE_ENTRIES: 8 # Items per page
BOT_LANGUAGE: "en" # The name of your file from the l10n folder without the .json suffix
MULTIBOT: "false" # Allows the use of a multibot
ETHPLORER_API_KEY: "" # API key from Ethplorer
CURRENCY: "USD" # fiat currency
RUNTIME_ENVIRONMENT: "PROD"
WEBHOOK_SECRET_TOKEN: "1234567890" # Any string you want
labels:
caddy: YOUR-DOMAIN-GOES-HERE
caddy.reverse_proxy: "bot:5000"
depends_on:
- caddy
networks:
- caddy
ports:
- "4040:4040"
- "5000:5000" # ${WEBAPP_PORT}:${WEBAPP_PORT}
expose:
- 4040
- 5000 # ${WEBAPP_PORT}
volumes:
- ./AiogramShopBot:/bot/data # endswith your database name
command: [ "python", "-u", "run.py" ]
redis:
image: redis:latest
container_name: redis
command:
- /bin/sh
- -c
- redis-server --requirepass "$${REDIS_PASSWORD:?REDIS_PASSWORD variable is not set}"
ports:
- "6379:6379"
env_file:
- .env
volumes:
- redis_data:/data
restart: always
volumes:
AiogramShopBot:
caddy_data:
redis_data:
networks:
caddy: