Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add missing service resource limits #126

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docker-compose.dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -115,6 +120,7 @@ services:
- default
ports:
- 8080:8080
mem_limit: 1G

aggregation:
environment:
Expand Down
2 changes: 2 additions & 0 deletions etc/bento.env
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions lib/auth/docker-compose.auth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions lib/public/docker-compose.public.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down