From a49bee446263106a69063c209ba918c900a62ce9 Mon Sep 17 00:00:00 2001 From: Muhammad A Elmessary <33552352+elmessary@users.noreply.github.com> Date: Mon, 23 Oct 2023 21:33:13 +0100 Subject: [PATCH] chore(release): small fixes (#1447) authored-by: elmessary --- docker/docker-compose.prod.yaml | 2 +- docker/production/scripts/deploy-feature.sh | 3 ++- docker/production/scripts/deploy-site.sh | 1 + docker/production/scripts/init-app.sh | 8 ++++++++ 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/docker/docker-compose.prod.yaml b/docker/docker-compose.prod.yaml index 5882c2e9e..9c1a4d36e 100644 --- a/docker/docker-compose.prod.yaml +++ b/docker/docker-compose.prod.yaml @@ -8,7 +8,7 @@ services: command: > sh -c "/home/config_cll/init-app.sh" ports: - - 80:80 + - ${app_port}:80 expose: - 80 - 443 diff --git a/docker/production/scripts/deploy-feature.sh b/docker/production/scripts/deploy-feature.sh index fece5e2b9..d637f942a 100644 --- a/docker/production/scripts/deploy-feature.sh +++ b/docker/production/scripts/deploy-feature.sh @@ -47,10 +47,11 @@ EnvFileName='env_vars-RO.txt'; Profile='live'; ComposeFile='docker-compose.prod.yaml'; -ContainerName='cllro_dev'; +ContainerName='cl_dev'; RepoBase='https://github.com/SwanseaUniversityMedical/concept-library.git'; RepoBranch='manual-feature-branch'; +export app_port=80; # Collect CLI args while [[ "$#" -gt 0 ]] diff --git a/docker/production/scripts/deploy-site.sh b/docker/production/scripts/deploy-site.sh index 5af93f385..1e0223981 100644 --- a/docker/production/scripts/deploy-site.sh +++ b/docker/production/scripts/deploy-site.sh @@ -44,6 +44,7 @@ LibraryAddress=''; RootPath='/root/'; ComposeFile='docker-compose.prod.yaml'; +export app_port=80; # Collect CLI args while [[ "$#" -gt 0 ]] diff --git a/docker/production/scripts/init-app.sh b/docker/production/scripts/init-app.sh index 6a422b6d1..6df2ebf12 100644 --- a/docker/production/scripts/init-app.sh +++ b/docker/production/scripts/init-app.sh @@ -29,6 +29,14 @@ if [ ! -z $DEBUG ] && [ $DEBUG = "False" ]; then python manage.py collectstatic --noinput --ignore=*.scss -v 0 chown -R www-data:www-data /var/www/concept_lib_sites + + # test if re-run avoid compress issues + python manage.py compilescss + python manage.py collectstatic --noinput --clear --ignore=*.scss -v 0 + python manage.py compress + python manage.py collectstatic --noinput --ignore=*.scss -v 0 + + chown -R www-data:www-data /var/www/concept_lib_sites else python manage.py compilescss --delete-files python manage.py collectstatic --clear --noinput -v 0