From e6c154b57fb29529ca12b90426d2da04caed5dde Mon Sep 17 00:00:00 2001 From: Tim Hostetler <6970899+thostetler@users.noreply.github.com> Date: Tue, 16 Mar 2021 15:18:51 -0400 Subject: [PATCH] Adds a 1g memory limit on docker server Also provides a way to send extra arguments to the docker command when starting the server --- server.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server.sh b/server.sh index 958a0765d..442e1debd 100755 --- a/server.sh +++ b/server.sh @@ -7,7 +7,10 @@ fi home=`pwd` target=${1:-src} # workdir that will become webserver's root +extraargs=${2:- -m=1g} +# add extra args (to docker) like this: +# ./server.sh src '-m=1g --memory-swap=1g ...' docker rm -f bbb-nginx 2>/dev/null -docker run -p 8000:80 -v $home/$target/:/app/production -v $home/nginx.conf:/etc/nginx/nginx.conf bbb-nginx nginx +docker run -p 8000:80 -v $home/$target/:/app/production -v $home/nginx.conf:/etc/nginx/nginx.conf $extraargs bbb-nginx nginx