From 1ae4bfcc23889c48e656b4b390a48b0fa57e9fee Mon Sep 17 00:00:00 2001 From: Edric Pauk Date: Fri, 28 Jan 2022 10:40:50 -0800 Subject: [PATCH 1/2] add dockerfile and scripts for deployment on scec.org production server --- docker-compose-resource-limits.yml | 11 +++++++++++ prodbuild.sh | 3 +++ prodstart.sh | 3 +++ 3 files changed, 17 insertions(+) create mode 100644 docker-compose-resource-limits.yml create mode 100755 prodbuild.sh create mode 100755 prodstart.sh diff --git a/docker-compose-resource-limits.yml b/docker-compose-resource-limits.yml new file mode 100644 index 00000000..01e4df27 --- /dev/null +++ b/docker-compose-resource-limits.yml @@ -0,0 +1,11 @@ +version: '2.2' + +services: + + db: + mem_limit: 5g + cpus: 3 + + web: + mem_limit: 5g + cpus: 3 diff --git a/prodbuild.sh b/prodbuild.sh new file mode 100755 index 00000000..53a23300 --- /dev/null +++ b/prodbuild.sh @@ -0,0 +1,3 @@ +#!/bin/bash +# Script to build production CFM on SCEC.org server +docker-compose -f docker-compose.yml -f docker-compose-resource-limits.yml up --build --force -d diff --git a/prodstart.sh b/prodstart.sh new file mode 100755 index 00000000..d73b15fb --- /dev/null +++ b/prodstart.sh @@ -0,0 +1,3 @@ +#!/bin/bash +# Script to start production CFM on SCEC.org server +docker-compose -f docker-compose.yml -f docker-compose-resource-limits.yml up -d From aafddf5a3bc6200a3285023510edf3be29e5b2b2 Mon Sep 17 00:00:00 2001 From: Edric Pauk Date: Fri, 28 Jan 2022 11:12:09 -0800 Subject: [PATCH 2/2] adjust YML version --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 8cd58e3a..6cc14f8e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,5 @@ # Use postgres/example user/password credentials -version: '3.1' +version: '2.2' services: