-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
54 lines (47 loc) · 919 Bytes
/
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
version: '2'
services:
# Database
postgres:
image: postgres:16.2
ports:
- "5432:5432"
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
mem_limit: 2000M
memswap_limit: 3000M
cpus: 1
cpu_shares: 40
cpuset: "0"
networks:
- postgres
volumes:
- postgres:/var/lib/postgresql/data
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
restart: on-failure
pyrogram_bot:
build: .
container_name: pyrogram_bot
command: python3 -m app
environment:
- CLIENT_SESSION_PATH=/bot_init
env_file:
- .env
depends_on:
- postgres
volumes:
- pyrogram:/bot_init
mem_limit: 3500M
memswap_limit: 5500M
cpus: 1
cpu_shares: 50
cpuset: "0"
networks:
- postgres
restart: always
volumes:
postgres:
pyrogram:
networks:
postgres:
driver: bridge