diff --git a/Config/Hyperling.com/Dockerfile b/Config/Hyperling.com/Dockerfile index c033639..90d2181 100644 --- a/Config/Hyperling.com/Dockerfile +++ b/Config/Hyperling.com/Dockerfile @@ -20,7 +20,7 @@ CMD cd /var/www/api && \ ls -l website/files; rm -v website/files; sleep 0 && \ echo "Dockerfile: Clone the website's Git repo..." && \ rm -rfv website && \ - git clone https://git.hyperling.com/me/nodejs-website website && \ + git clone https://git.hyperling.com/me/nodejs-website $BRANCH website && \ echo "Dockerfile: Remove dummy files and replace with symlink..." && \ rm -rfv website/files && \ cd website && \ diff --git a/Config/Hyperling.com/docker-compose.standard.yml b/Config/Hyperling.com/docker-compose.main.yml similarity index 71% rename from Config/Hyperling.com/docker-compose.standard.yml rename to Config/Hyperling.com/docker-compose.main.yml index 917e319..6543013 100644 --- a/Config/Hyperling.com/docker-compose.standard.yml +++ b/Config/Hyperling.com/docker-compose.main.yml @@ -10,11 +10,15 @@ services: restart: always ports: - 8317:8080 + environment: + - BRANCH=$BRANCH + - CPU=$CPU + - MEM=$MEM volumes: - ./files:/var/www/api/files deploy: mode: global resources: limits: - cpus: '0.25' - memory: 256M + cpus: $CPU + memory: $RAM diff --git a/Config/Hyperling.com/docker-compose.micro.yml b/Config/Hyperling.com/docker-compose.micro.yml deleted file mode 100644 index a3961c1..0000000 --- a/Config/Hyperling.com/docker-compose.micro.yml +++ /dev/null @@ -1,21 +0,0 @@ -# 2022-10-29 -# Hyperling.com configuration. -# 2023-01-24 container needs 128M to get started fully then settles to 25M. - -services: - app: - container_name: www-app - build: - context: ./ - network: host - restart: always - ports: - - 8317:8080 - volumes: - - ./files:/var/www/api/files - deploy: - mode: global - resources: - limits: - cpus: '0.10' - memory: 128M diff --git a/Config/Hyperling.com/env.example b/Config/Hyperling.com/env.example index 768122e..d30e7ea 100644 --- a/Config/Hyperling.com/env.example +++ b/Config/Hyperling.com/env.example @@ -7,3 +7,18 @@ # Subsequent builds consistently take less than 2 seconds. # Testing was done on the micro server, not a workstation. COMPOSE_BAKE=true + +## Branch ## +# Allow choosing the branch. By keaving it blank, main will be used. +# Should be in the full "--branch my-branch" syntax. +BRANCH= +#BRANCH="--branch dev" + +## Performance ## +# Standard Server +CPU=0.25 +MEM=0.25G +# Micro Server +# 2023-01-24 container needs 128M to get started fully then settles to 25M. +CPU=0.10 +MEM=128M