forked from mtusi2026/mtusi2026lab3
feat: add 5 experiment
This commit is contained in:
+28
-3
@@ -6,7 +6,16 @@ services:
|
||||
mem_limit: 128m
|
||||
networks: [data]
|
||||
image: redis:7.4.11-bookworm
|
||||
command: ["redis-server", "--appendonly", "yes", "--appendfsync", "everysec", "--dir", "/data"]
|
||||
command:
|
||||
[
|
||||
"redis-server",
|
||||
"--appendonly",
|
||||
"yes",
|
||||
"--appendfsync",
|
||||
"everysec",
|
||||
"--dir",
|
||||
"/data",
|
||||
]
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
healthcheck:
|
||||
@@ -50,6 +59,8 @@ services:
|
||||
replicas: 2
|
||||
stop_grace_period: 15s
|
||||
environment:
|
||||
# Go 1.22 sees host CPUs; keep parallelism suitable for this 0.5 CPU limit.
|
||||
GOMAXPROCS: ${API_GOMAXPROCS:-1}
|
||||
APP_HOST: 0.0.0.0
|
||||
APP_PORT: 8080
|
||||
SESSION_TTL_SECONDS: ${SESSION_TTL_SECONDS:-3600}
|
||||
@@ -81,7 +92,15 @@ services:
|
||||
api:
|
||||
condition: service_healthy
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-q", "-O", "/dev/null", "http://127.0.0.1:8080/health/ready"]
|
||||
test:
|
||||
[
|
||||
"CMD",
|
||||
"wget",
|
||||
"-q",
|
||||
"-O",
|
||||
"/dev/null",
|
||||
"http://127.0.0.1:8080/health/ready",
|
||||
]
|
||||
interval: 2s
|
||||
timeout: 3s
|
||||
retries: 20
|
||||
@@ -119,7 +138,13 @@ services:
|
||||
haproxy:
|
||||
condition: service_healthy
|
||||
healthcheck:
|
||||
test: ["CMD", "node", "-e", "fetch('http://127.0.0.1:5173/').then(r => process.exit(r.ok ? 0 : 1)).catch(() => process.exit(1))"]
|
||||
test:
|
||||
[
|
||||
"CMD",
|
||||
"node",
|
||||
"-e",
|
||||
"fetch('http://127.0.0.1:5173/').then(r => process.exit(r.ok ? 0 : 1)).catch(() => process.exit(1))",
|
||||
]
|
||||
interval: 5s
|
||||
timeout: 3s
|
||||
retries: 20
|
||||
|
||||
Reference in New Issue
Block a user