-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathdocker-compose.yml
90 lines (90 loc) · 2.37 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
84
85
86
87
88
89
90
version: "2.13.0"
services:
tor-purr-bot-vpn:
image: cmulk/wireguard-docker:alpine
container_name: tor-purr-bot-vpn
privileged: true
cap_add:
- net_admin
sysctls:
- net.ipv6.conf.all.disable_ipv6=0
networks:
- default
volumes:
- ./wireguard/wg0.conf:/etc/wireguard/wg0.conf
logging:
driver: "json-file"
options:
max-size: "5m"
restart: always
postgres:
image: postgres:15.2-alpine
ports:
- "5454:5432"
volumes:
- type: bind
source: ${STORAGE_PATH}/postgres-data
target: /var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: '${POSTGRES_PASSWORD}'
logging:
driver: "json-file"
options:
max-size: "5m"
restart: unless-stopped
telegram-api:
image: aiogram/telegram-bot-api
depends_on:
- tor-purr-bot-vpn
network_mode: "service:tor-purr-bot-vpn"
environment:
TELEGRAM_STAT: ${TELEGRAM_STAT}
TELEGRAM_API_ID: ${TELEGRAM_API_ID}
TELEGRAM_API_HASH: ${TELEGRAM_API_HASH}
volumes:
- type: bind
source: ${STORAGE_PATH}/telegram-bot-api-data
target: /var/lib/telegram-bot-api
logging:
driver: "json-file"
options:
max-size: "5m"
restart: always
purr-purr:
build:
context: .
dockerfile: ./Dockerfile
cpu_count: 8
mem_limit: "8000M"
depends_on:
- tor-purr-bot-vpn
- telegram-api
- postgres
network_mode: "service:tor-purr-bot-vpn"
runtime: nvidia
environment:
TZ: "Europe/Moscow"
POSTGRES_CONNECT: host=postgres user=postgres password=${POSTGRES_PASSWORD} sslmode=disable
NVIDIA_VISIBLE_DEVICES: "all"
NVIDIA_DRIVER_CAPABILITIES: "compute,utility,video"
DEV: ${DEV}
BOT_DEBUG: ${BOT_DEBUG}
BOT_TOKEN: ${BOT_TOKEN}
CHAT_ID_CHANNEL_LOG: ${CHAT_ID_CHANNEL_LOG}
DIR_BOT: "/bot-data"
DOWNLOAD_LIMIT: ${DOWNLOAD_LIMIT}
TG_API_ENDPOINT: tor-purr-bot-vpn:8081
TG_PATH_LOCAL: "/telegram-bot-api-data"
WELCOME_VIDEO_ID: ${WELCOME_VIDEO_ID}
volumes:
- type: bind
source: ${STORAGE_PATH}/bot-data
target: /bot-data
- type: bind
source: ${STORAGE_PATH}/telegram-bot-api-data
target: /telegram-bot-api-data
logging:
driver: "json-file"
options:
max-size: "5m"
restart: unless-stopped