diff --git a/docker-compose.dev.yaml b/docker-compose.dev.yaml index 9f991435..e662b528 100644 --- a/docker-compose.dev.yaml +++ b/docker-compose.dev.yaml @@ -18,6 +18,11 @@ services: ports: - "${BENTO_PUBLIC_EXTERNAL_PORT}:${BENTO_PUBLIC_INTERNAL_PORT}" + auth-db: + extends: + file: $PWD/lib/auth/docker-compose.auth.yaml + service: auth-db + gateway: # Override network aliases, adding BENTOV2_AUTH_DOMAIN # Other networks are inherited @@ -115,6 +120,7 @@ services: - default ports: - 8080:8080 + mem_limit: 1G aggregation: environment: diff --git a/etc/bento.env b/etc/bento.env index 95b52a93..d23df5d7 100644 --- a/etc/bento.env +++ b/etc/bento.env @@ -63,6 +63,7 @@ BENTO_AUTH_DB="auth" BENTO_AUTH_DB_USER="auth_user" # BENTO_AUTH_DB_PASSWORD is set in local.env BENTO_AUTH_DB_NETWORK="${BENTOV2_PREFIX}-auth-db-net" +BENTO_AUTH_DB_MEM_LIM=1G # Web BENTO_WEB_CUSTOM_HEADER= @@ -328,6 +329,7 @@ BENTO_PUBLIC_NETWORK=${BENTOV2_PREFIX}-public-net BENTO_PUBLIC_INTERNAL_PORT=${BENTO_STD_SERVICE_INTERNAL_PORT} BENTO_PUBLIC_EXTERNAL_PORT=8090 +BENTO_PUBLIC_MEM_LIM=2G BENTO_PUBLIC_DEBUG=false BENTO_PUBLIC_SERVICE_ID=${BENTOV2_PREFIX}-public diff --git a/lib/auth/docker-compose.auth.yaml b/lib/auth/docker-compose.auth.yaml index 329c2aed..3869bd32 100644 --- a/lib/auth/docker-compose.auth.yaml +++ b/lib/auth/docker-compose.auth.yaml @@ -46,6 +46,7 @@ services: - auth-db-net volumes: - ${BENTOV2_AUTH_VOL_DIR}:/var/lib/postgresql/data + mem_limit: ${BENTO_AUTH_DB_MEM_LIM} healthcheck: test: [ "CMD", "pg_isready", "-q", "-d", "${BENTO_AUTH_DB}", "-U", "${BENTO_AUTH_DB_USER}" ] timeout: 5s diff --git a/lib/public/docker-compose.public.yaml b/lib/public/docker-compose.public.yaml index 9dbdf5db..7bf34a83 100644 --- a/lib/public/docker-compose.public.yaml +++ b/lib/public/docker-compose.public.yaml @@ -22,6 +22,7 @@ services: - ${PWD}/lib/public/about.html:/bento-public/www/public/about.html:ro - ${PWD}/lib/public/branding.png:/bento-public/www/public/assets/branding.png:ro + mem_limit: ${BENTO_PUBLIC_MEM_LIM} healthcheck: test: [ "CMD", "curl", "http://localhost:${BENTO_PUBLIC_INTERNAL_PORT}/service-info" ] timeout: ${BENTOV2_HEALTHCHECK_TIMEOUT}