From aad23cf892b9f191013d7478fde63e6693ae993e Mon Sep 17 00:00:00 2001 From: BryantHe Date: Thu, 14 Dec 2023 16:32:45 +0800 Subject: [PATCH] fix: change to host mode --- docker-compose-run.yml | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/docker-compose-run.yml b/docker-compose-run.yml index c94f6bf..f05a2b9 100644 --- a/docker-compose-run.yml +++ b/docker-compose-run.yml @@ -1,7 +1,7 @@ version: "3.8" services: - pzx-web-api: + pzx-web-api-1: image: gitea.bearcatlog.com/bryant/ddk/pzx-web-api:latest env_file: - .apiflaskenv @@ -9,7 +9,32 @@ services: ports: - target: 5000 published: 7000 - mode: ingress + mode: host + deploy: + mode: replicated + replicas: 2 + update_config: + parallelism: 1 + failure_action: rollback + restart_policy: + condition: on-failure + delay: 5s + max_attempts: 3 + window: 120s + placement: + constraints: + - 'node.role == worker' + networks: + - pzx-web-api-network + pzx-web-api-2: + image: gitea.bearcatlog.com/bryant/ddk/pzx-web-api:latest + env_file: + - .apiflaskenv + - .apiflask.env + ports: + - target: 5000 + published: 7010 + mode: host deploy: mode: replicated replicas: 2