Проверять готовность PostgreSQL по TCP и ограничить память Valkey
This commit is contained in:
+3
-1
@@ -41,7 +41,9 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- pgdata:/var/lib/postgresql
|
- pgdata:/var/lib/postgresql
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "pg_isready", "-U", "messenger", "-d", "messenger"]
|
# Over TCP: during first initialisation the image runs a temporary
|
||||||
|
# server on the Unix socket only, which must not count as ready.
|
||||||
|
test: ["CMD", "pg_isready", "-h", "127.0.0.1", "-U", "messenger", "-d", "messenger"]
|
||||||
interval: 5s
|
interval: 5s
|
||||||
timeout: 3s
|
timeout: 3s
|
||||||
retries: 10
|
retries: 10
|
||||||
|
|||||||
@@ -9,8 +9,10 @@ dir /data
|
|||||||
# The append-only file already persists everything; RDB snapshots are off.
|
# The append-only file already persists everything; RDB snapshots are off.
|
||||||
save ""
|
save ""
|
||||||
|
|
||||||
# Sessions are never evicted to free memory: a full store refuses new logins
|
# Sessions are never evicted to free memory: once maxmemory is reached the
|
||||||
# (503) instead of silently logging users out.
|
# store refuses new sessions (login answers 503) instead of silently logging
|
||||||
|
# users out. A session key takes about a hundred bytes.
|
||||||
|
maxmemory 256mb
|
||||||
maxmemory-policy noeviction
|
maxmemory-policy noeviction
|
||||||
|
|
||||||
# requirepass comes from the compose secret, never from the repository.
|
# requirepass comes from the compose secret, never from the repository.
|
||||||
|
|||||||
Reference in New Issue
Block a user