From 7c791b813a9d8aa3202d07783300537796c02239 Mon Sep 17 00:00:00 2001 From: oscgonfer Date: Fri, 20 Oct 2023 18:30:43 +0200 Subject: [PATCH] Docker compose proposal for managing resources --- docker-compose.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index cbf5b1dd..2b57ea19 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,3 @@ -version: '3.3' - services: db: image: postgres:10 @@ -41,6 +39,10 @@ services: - push #- mqtt restart: always + deploy: + resources: + limits: + memory: 2gb volumes: - "./:/app" #command: rails server -p 3000 -b '0.0.0.0' @@ -150,6 +152,11 @@ services: build: context: ./scripts/ dockerfile: Dockerfile-kairos + deploy: + restart_policy: + condition: on-failure + max_attempts: 3 + window: 120s ports: - 8080:8080 - 4242:4242 #telnet