-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
109 lines (104 loc) · 2.4 KB
/
docker-compose.yaml
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
version: '3.9'
services:
core:
restart: always
environment:
fun_file_storage_path: "/config"
fun_storage__redis_host: "redis"
fun_storage__postgres_dsn: "postgresql://main:main@postgres:5432/main"
fun_ds_supplier_url: "http://ds:8000"
image: ghcr.io/teadove/fun-telegram:v1.12.3
volumes:
- ".mtproto:/.mtproto"
- ".env:/.env"
depends_on:
redis:
condition: service_healthy
postgres:
condition: service_healthy
# ds:
# condition: service_healthy
labels:
- "autoheal=true"
healthcheck:
test: curl -f http://127.0.0.1:3333/health || exit 1
interval: 2m
timeout: 20s
retries: 3
start_period: 5s
deploy:
resources:
limits:
cpus: '0.50'
memory: 1200M
# ds:
# restart: always
# environment:
# _UVICORN__HOST: "0.0.0.0"
# _UVICORN__PORT: 8000
# _UVICORN__WORKERS: 1
# volumes: []
# healthcheck:
# test: curl -f http://127.0.0.1:8000/health || exit 1
# interval: 2m
# timeout: 20s
# retries: 3
# start_period: 5s
# deploy:
# resources:
# limits:
# cpus: '0.75'
# memory: 1800M
# labels:
# - "autoheal=true"
# image: ghcr.io/teadove/fun-datascience:v2.1.0
autoheal:
restart: always
image: willfarrell/autoheal
volumes:
- /var/run/docker.sock:/var/run/docker.sock
deploy:
resources:
limits:
cpus: '0.50'
memory: 100M
redis:
image: redis:7.2-alpine
restart: always
command: redis-server --save 20 1 --loglevel warning
volumes:
- "./data/redis:/data"
labels:
- "autoheal=true"
healthcheck:
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
interval: 2m
timeout: 20s
retries: 3
start_period: 5s
deploy:
resources:
limits:
cpus: '0.50'
memory: 100M
postgres:
image: postgres:16.3-bookworm
environment:
POSTGRES_USER: "main"
POSTGRES_PASSWORD: "main"
POSTGRES_DB: "main"
volumes:
- ./data/pg:/var/lib/postgresql/data
labels:
- "autoheal=true"
healthcheck:
test: ["CMD", "pg_isready", "-d", "main"]
interval: 2m
timeout: 20s
retries: 3
start_period: 5s
deploy:
resources:
limits:
cpus: '0.50'
memory: 2000M