-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
64 lines (60 loc) · 1.54 KB
/
docker-compose.yml
File metadata and controls
64 lines (60 loc) · 1.54 KB
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
services:
# app:
# build: .
# container_name: fluently_bot
# env_file: .env
# environment:
# BOT_TOKEN: ${BOT_TOKEN}
# ports:
# - "${APP_PORT}:${APP_PORT}"
# depends_on:
# - redis
# - postgres
# restart: unless-stopped
# worker:
# build: .
# container_name: fluently_worker
# command: poetry run celery -A telegram.celery_app worker --loglevel=info
# env_file: .env
# depends_on:
# - redis
# - postgres
# restart: unless-stopped
# redis:
# image: redis:7
# # container_name: fluently_redis
# ports:
# - "6380:6379"
# restart: unless-stopped
postgres:
image: postgres:latest
container_name: fluently_db
env_file: .env
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_NAME}
PGDATA: /var/lib/postgresql/data/pgdata
ports:
- "${DB_PORT}:${DB_PORT}"
volumes:
- pgdata:/var/lib/postgresql/data/pgdata
command: >
postgres -c max_connections=1000
-c shared_buffers=256MB
-c effective_cache_size=768MB
-c maintenance_work_mem=64MB
-c checkpoint_completion_target=0.7
-c wal_buffers=16MB
-c default_statistics_target=100
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U ${DB_USER} -d ${DB_NAME}" ]
interval: 30s
timeout: 10s
retries: 5
restart: unless-stopped
tty: true
stdin_open: true
volumes:
pgdata:
driver: local