From 02149a10dacf3104826e4a9f6aee119e1b79bfd9 Mon Sep 17 00:00:00 2001 From: perl Date: Fri, 4 Oct 2024 00:48:20 +0300 Subject: [PATCH] add limits override compose file --- compose_extends/network.include.yaml | 5 +++++ docker-compose.limits.yaml | 5 +++++ docker-compose.yaml | 12 +++++------- 3 files changed, 15 insertions(+), 7 deletions(-) create mode 100644 compose_extends/network.include.yaml create mode 100644 docker-compose.limits.yaml diff --git a/compose_extends/network.include.yaml b/compose_extends/network.include.yaml new file mode 100644 index 0000000..efffb31 --- /dev/null +++ b/compose_extends/network.include.yaml @@ -0,0 +1,5 @@ +networks: + services: + external: true + driver: bridge + name: services \ No newline at end of file diff --git a/docker-compose.limits.yaml b/docker-compose.limits.yaml new file mode 100644 index 0000000..5ee128b --- /dev/null +++ b/docker-compose.limits.yaml @@ -0,0 +1,5 @@ +services: + reverse: + cpu_count: 2 + mem_limit: 256m + mem_reservation: 256m \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml index aaf14f9..4dcfaa8 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,3 +1,7 @@ +include: + - path: + - compose_extends/network.include.yaml + services: reverse: extends: @@ -18,10 +22,4 @@ services: - 80:80 - 443:443 networks: - - services - -networks: - services: - external: true - driver: bridge - name: services + - services \ No newline at end of file