Skip to content

Commit

Permalink
Merge pull request #2130 from thostetler/limit-server-memory-usage
Browse files Browse the repository at this point in the history
Add 1g memory limit on docker server
  • Loading branch information
ehenneken authored Mar 19, 2021
2 parents b157b99 + e6c154b commit 138799b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 138799b

Please sign in to comment.