@@ -8,6 +8,7 @@ services:
8
8
tags :
9
9
- " ttt:prod"
10
10
container_name : ttt
11
+ restart : always
11
12
depends_on :
12
13
postgres_master :
13
14
condition : service_healthy
@@ -34,10 +35,12 @@ services:
34
35
- postgres
35
36
- redis
36
37
command : ttt
38
+ mem_limit : 200mb
37
39
38
40
redis :
39
41
image : redis:8.0.2-bookworm
40
42
container_name : ttt-redis
43
+ restart : always
41
44
volumes :
42
45
- redis-data:/data
43
46
- ./redis:/mnt/dev
@@ -51,6 +54,7 @@ services:
51
54
command : [
52
55
" redis-server" , "/mnt/dev/redis.conf", "--requirepass", "$REDIS_PASSWORD"
53
56
]
57
+ mem_limit : 20mb
54
58
55
59
postgres_master :
56
60
build :
@@ -59,6 +63,7 @@ services:
59
63
tags :
60
64
- " ttt_postgres_master:prod"
61
65
container_name : ttt-postgres-master
66
+ restart : always
62
67
volumes :
63
68
- postgres-master-data:/var/lib/postgresql/data
64
69
networks :
@@ -69,6 +74,7 @@ services:
69
74
POSTGRES_PASSWORD : ${POSTGRES_TTT_PASSWORD}
70
75
POSTGRES_REPLICA_PASSWORD : ${POSTGRES_REPLICA_PASSWORD}
71
76
command : ["-c", "config_file=/mnt/postgres.conf"]
77
+ mem_limit : 30mb
72
78
healthcheck :
73
79
test : pg_isready -d ttt -U ttt
74
80
start_period : 1m
@@ -85,6 +91,7 @@ services:
85
91
POSTGRES_REPLICA_NAME : replica1
86
92
POSTGRES_REPLICA_PASSWORD : ${POSTGRES_REPLICA_PASSWORD}
87
93
container_name : ttt-postgres-replica1
94
+ restart : always
88
95
depends_on :
89
96
postgres_master :
90
97
condition : service_healthy
@@ -96,8 +103,8 @@ services:
96
103
POSTGRES_DB : ttt
97
104
POSTGRES_USER : ttt
98
105
POSTGRES_PASSWORD : ${POSTGRES_TTT_PASSWORD}
99
- # user: postgres
100
106
command : ["bash", "/mnt/start-server.sh"]
107
+ mem_limit : 30mb
101
108
healthcheck :
102
109
test : pg_isready -d ttt -U ttt
103
110
start_period : 1m
0 commit comments