lab5 done
This commit is contained in:
+36
-13
@@ -18,7 +18,7 @@ services:
|
||||
deploy:
|
||||
replicas: 1
|
||||
placement:
|
||||
constraints: [node.labels.mtusi_lab4_storage == true]
|
||||
constraints: [node.labels.mtusi_lab5_storage == true]
|
||||
resources:
|
||||
limits: {cpus: '1.0', memory: 512M}
|
||||
update_config: {parallelism: 1, order: stop-first}
|
||||
@@ -39,9 +39,9 @@ services:
|
||||
deploy:
|
||||
replicas: 1
|
||||
placement:
|
||||
constraints: [node.labels.mtusi_lab4_storage == true]
|
||||
constraints: [node.labels.mtusi_lab5_storage == true]
|
||||
resources:
|
||||
limits: {cpus: '0.5', memory: 128M}
|
||||
limits: {cpus: '0.5', memory: 384M}
|
||||
update_config: {parallelism: 1, order: stop-first}
|
||||
minio:
|
||||
image: ${S3_IMAGE:-mtusi-minio:RELEASE.2025-09-07T16-13-09Z}
|
||||
@@ -58,13 +58,13 @@ services:
|
||||
deploy:
|
||||
replicas: 1
|
||||
placement:
|
||||
constraints: [node.labels.mtusi_lab4_storage == true]
|
||||
constraints: [node.labels.mtusi_lab5_storage == true]
|
||||
resources:
|
||||
limits: {cpus: '1.0', memory: 512M}
|
||||
update_config: {parallelism: 1, order: stop-first}
|
||||
api:
|
||||
image: ${API_IMAGE:-mtusi-messenger:lab4}
|
||||
environment:
|
||||
image: ${API_IMAGE:-mtusi-messenger:lab5}
|
||||
environment: &api_environment
|
||||
INSTANCE_ID: '{{.Task.ID}}'
|
||||
POSTGRES_HOST: postgres
|
||||
POSTGRES_USER: messenger
|
||||
@@ -104,6 +104,27 @@ services:
|
||||
monitor: 15s
|
||||
failure_action: rollback
|
||||
rollback_config: {parallelism: 1, order: start-first}
|
||||
worker:
|
||||
image: ${API_IMAGE:-mtusi-messenger:lab5}
|
||||
entrypoint: [/usr/local/bin/worker]
|
||||
environment:
|
||||
<<: *api_environment
|
||||
WORKER_CONCURRENCY: '2'
|
||||
WORKER_PREFETCH: '4'
|
||||
WORKER_MAX_ATTEMPTS: '5'
|
||||
WORKER_TIMEOUT_SECONDS: '25'
|
||||
WORKER_LEASE_SECONDS: '40'
|
||||
WORKER_PIXEL_BUDGET: '40000000'
|
||||
secrets: [postgres_password, cursor_key, s3_access_key, s3_secret_key]
|
||||
networks: [data]
|
||||
healthcheck: {disable: true}
|
||||
stop_grace_period: 10s
|
||||
deploy:
|
||||
replicas: 1
|
||||
resources:
|
||||
limits: {cpus: '1.0', memory: 1536M}
|
||||
restart_policy: {condition: any, delay: 1s}
|
||||
update_config: {parallelism: 1, order: stop-first}
|
||||
lb:
|
||||
image: haproxy:3.2.6-alpine
|
||||
configs:
|
||||
@@ -112,7 +133,7 @@ services:
|
||||
networks: [backend]
|
||||
ports:
|
||||
- target: 8080
|
||||
published: ${PORT:-8080}
|
||||
published: ${PORT:-18085}
|
||||
protocol: tcp
|
||||
mode: host
|
||||
healthcheck:
|
||||
@@ -138,27 +159,29 @@ configs:
|
||||
haproxy:
|
||||
file: ./infra/haproxy.cfg
|
||||
redis:
|
||||
name: ${STACK_NAME:-mtusi-lab5}_redis_v5
|
||||
file: ./infra/redis.conf
|
||||
s3_bootstrap:
|
||||
file: ./infra/s3-bootstrap.sh
|
||||
s3_policy:
|
||||
name: ${STACK_NAME:-mtusi-lab5}_s3_policy_v5
|
||||
file: ./infra/s3-policy.json
|
||||
secrets:
|
||||
postgres_password:
|
||||
external: true
|
||||
name: ${STACK_NAME:-mtusi-lab4}_postgres_password
|
||||
name: ${STACK_NAME:-mtusi-lab5}_postgres_password
|
||||
cursor_key:
|
||||
external: true
|
||||
name: ${STACK_NAME:-mtusi-lab4}_cursor_key
|
||||
name: ${STACK_NAME:-mtusi-lab5}_cursor_key
|
||||
s3_root_access_key:
|
||||
external: true
|
||||
name: ${STACK_NAME:-mtusi-lab4}_s3_root_access_key
|
||||
name: ${STACK_NAME:-mtusi-lab5}_s3_root_access_key
|
||||
s3_root_secret_key:
|
||||
external: true
|
||||
name: ${STACK_NAME:-mtusi-lab4}_s3_root_secret_key
|
||||
name: ${STACK_NAME:-mtusi-lab5}_s3_root_secret_key
|
||||
s3_access_key:
|
||||
external: true
|
||||
name: ${STACK_NAME:-mtusi-lab4}_s3_access_key
|
||||
name: ${STACK_NAME:-mtusi-lab5}_s3_access_key
|
||||
s3_secret_key:
|
||||
external: true
|
||||
name: ${STACK_NAME:-mtusi-lab4}_s3_secret_key
|
||||
name: ${STACK_NAME:-mtusi-lab5}_s3_secret_key
|
||||
|
||||
Reference in New Issue
Block a user