From 8d12826d44de7fcf76e05931497bb425340d1642 Mon Sep 17 00:00:00 2001 From: Viet Anh Nguyen Date: Fri, 15 Dec 2023 14:12:23 +0700 Subject: [PATCH] Auto restart for all services --- cope2n-api/fwd_api/celery_worker/process_result_tasks.py | 2 +- docker-compose.yml | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cope2n-api/fwd_api/celery_worker/process_result_tasks.py b/cope2n-api/fwd_api/celery_worker/process_result_tasks.py index eea2c3b..5dc3b3f 100755 --- a/cope2n-api/fwd_api/celery_worker/process_result_tasks.py +++ b/cope2n-api/fwd_api/celery_worker/process_result_tasks.py @@ -7,7 +7,7 @@ from fwd_api.models import SubscriptionRequest from fwd_api.exception.exceptions import InvalidException from fwd_api.models import SubscriptionRequest from fwd_api.constant.common import ProcessType -from fwd_api.utils import redis as RedisUtils +from fwd_api.utils.redis import RedisUtils from fwd_api.utils import process as ProcessUtil redis_client = RedisUtils() diff --git a/docker-compose.yml b/docker-compose.yml index 7290533..d56930f 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -93,6 +93,7 @@ services: - ./data/minio_data:/data networks: - ctel-sbt + restart: always command: server --address :9884 --console-address :9885 /data profiles: ["local"] @@ -149,11 +150,9 @@ services: - BASE_URL=http://be-ctel-sbt:${BASE_PORT} - REDIS_HOST=result-cache - REDIS_PORT=6379 - - + restart: always networks: - ctel-sbt - # restart: always depends_on: db-sbt: condition: service_started @@ -168,6 +167,7 @@ services: # Back-end persistent db-sbt: + restart: always mem_reservation: 500m # mem_limit: 1g # container_name: sidp-cope2n-be-sbt-db @@ -200,6 +200,7 @@ services: # Front-end services fe-sbt: + restart: always build: context: cope2n-fe shm_size: 10gb