From 39a11a7afcb1d6c94d5021a138e5011f9c45c45f Mon Sep 17 00:00:00 2001 From: Evan Feenstra Date: Thu, 8 Aug 2024 09:52:17 -0700 Subject: [PATCH] sphinx-swarm 300mb mem limit --- docker-compose.yml | 6 ++++-- src/images/neo4j.rs | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 9bf4d159..6e813da0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,3 @@ -version: "2" - services: load_balancer: image: traefik:v2.2.1 @@ -61,6 +59,10 @@ services: - "traefik.http.routers.elements.tls.certresolver=myresolver" - "traefik.http.routers.elements.entrypoints=websecure" restart: on-failure + deploy: + resources: + limits: + memory: 300M environment: - HOST=$HOST # subdomain e.g. swarmx.sphinx.chat - IP=$IP diff --git a/src/images/neo4j.rs b/src/images/neo4j.rs index 85041f5d..8bf2ed22 100644 --- a/src/images/neo4j.rs +++ b/src/images/neo4j.rs @@ -1,7 +1,7 @@ // use super::traefik::{neo4j_labels, traefik_labels}; use super::*; use crate::config::Node; -use crate::dock::upload_to_container; +use crate::dock::{exec, upload_to_container}; use crate::utils::{domain, exposed_ports, host_config}; use anyhow::Result; use async_trait::async_trait;