-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcompose.yaml
More file actions
150 lines (137 loc) · 2.8 KB
/
Copy pathcompose.yaml
File metadata and controls
150 lines (137 loc) · 2.8 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
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
services:
db:
shm_size: 2gb
image: postgres:17
restart: unless-stopped
user: "1000:1000"
env_file:
- ./.env.docker
command:
- postgres
# Memory
- -c
- shared_buffers=1GB
- -c
- effective_cache_size=2GB
- -c
- work_mem=32MB
- -c
- maintenance_work_mem=256MB
# WAL / checkpoints
- -c
- checkpoint_completion_target=0.9
- -c
- wal_buffers=16MB
- -c
- max_wal_size=3GB
- -c
- min_wal_size=1GB
# Query planner
- -c
- random_page_cost=1.1
- -c
- effective_io_concurrency=200
# Connections
- -c
- max_connections=150
- -c
- jit=off
volumes:
- ./pgdata:/var/lib/postgresql/data
networks:
- pf_network
redis:
image: redis:6.2
restart: unless-stopped
env_file:
- ./.env.docker
volumes:
- redis_data:/data
networks:
- pf_network
celery:
build:
context: .
target: runtime
container_name: piefed_celery1
restart: unless-stopped
depends_on:
- db
- redis
env_file:
- ./.env.docker
entrypoint: ./entrypoint_celery.sh
volumes:
- ./media/:/app/app/static/media/
- ./logs/:/app/logs/
- ./tmp/:/app/app/static/tmp/
networks:
- pf_network
healthcheck:
test: ["CMD", "celery", "-A", "celery_worker_docker.celery", "inspect", "ping"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
web:
build:
context: .
target: runtime
container_name: piefed_app1
restart: unless-stopped
depends_on:
- db
- redis
env_file:
- ./.env.docker
volumes:
- ./gunicorn.conf.py:/app/gunicorn.conf.py
- ./media/:/app/app/static/media/
- ./logs/:/app/logs/
- ./tmp/:/app/app/static/tmp/
ports:
- '8030:5000'
networks:
- pf_network
healthcheck:
test: ["CMD", "pgrep", "-f", "gunicorn"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
piefednotifs:
build:
context: .
target: runtime
container_name: piefed_notifs
restart: unless-stopped
depends_on:
- redis
env_file:
- ./.env.docker
entrypoint: ./entrypoint_async.sh
ports:
- "8040:8000" # host:container, Piefed-Notifs runs on 8000 internally
networks:
- pf_network
healthcheck:
test: [ "CMD", "pgrep", "-f", "uvicorn" ]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
adminer:
image: adminer
restart: unless-stopped
ports:
- 127.0.0.1:8888:8080
depends_on:
- db
networks:
- pf_network
networks:
pf_network:
name: pf_network
external: false
volumes:
redis_data: