From a6c7bb8553205c6f7dc580d7ccff7a339d932265 Mon Sep 17 00:00:00 2001 From: Ryan Williams Date: Thu, 7 Nov 2024 10:15:51 +0000 Subject: [PATCH 1/6] added copilot config --- .copilot/config.yml | 4 ++++ .copilot/image_build_run.sh | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 .copilot/config.yml create mode 100644 .copilot/image_build_run.sh diff --git a/.copilot/config.yml b/.copilot/config.yml new file mode 100644 index 00000000..c30d28b4 --- /dev/null +++ b/.copilot/config.yml @@ -0,0 +1,4 @@ +repository: identity +builder: + name: paketobuildpacks/builder-jammy-full + version: 0.3.339 \ No newline at end of file diff --git a/.copilot/image_build_run.sh b/.copilot/image_build_run.sh new file mode 100644 index 00000000..20694424 --- /dev/null +++ b/.copilot/image_build_run.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +# Exit early if something goes wrong +set -e + +echo "Running post build script" + +echo "Renaming .env.ci to .env" +mv ".env.ci" ".env" + +cd src + +echo "Running collectstatic" +python manage.py collectstatic --settings=config.settings.build --noinput + +echo "Renaming .env to .env.ci" +cd ../ +mv ".env" ".env.ci" \ No newline at end of file From e4665833534b640dd79be79bdc486d01f886ac0c Mon Sep 17 00:00:00 2001 From: Ryan Williams Date: Thu, 7 Nov 2024 10:17:29 +0000 Subject: [PATCH 2/6] updated version --- .copilot/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.copilot/config.yml b/.copilot/config.yml index c30d28b4..f60e3e79 100644 --- a/.copilot/config.yml +++ b/.copilot/config.yml @@ -1,4 +1,4 @@ repository: identity builder: name: paketobuildpacks/builder-jammy-full - version: 0.3.339 \ No newline at end of file + version: 0.4.240 \ No newline at end of file From c3cb51a18afb409cb3548e54d446e368b2db5cb4 Mon Sep 17 00:00:00 2001 From: Ryan Williams Date: Thu, 7 Nov 2024 10:20:47 +0000 Subject: [PATCH 3/6] updated build stage --- .copilot/image_build_run.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/.copilot/image_build_run.sh b/.copilot/image_build_run.sh index 20694424..d5ac7534 100644 --- a/.copilot/image_build_run.sh +++ b/.copilot/image_build_run.sh @@ -10,9 +10,6 @@ mv ".env.ci" ".env" cd src -echo "Running collectstatic" -python manage.py collectstatic --settings=config.settings.build --noinput - echo "Renaming .env to .env.ci" cd ../ mv ".env" ".env.ci" \ No newline at end of file From 25e23001c5b33e438d85633a7307d70142532a16 Mon Sep 17 00:00:00 2001 From: Ryan Williams Date: Thu, 7 Nov 2024 10:24:15 +0000 Subject: [PATCH 4/6] updated build stage --- .copilot/image_build_run.sh | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.copilot/image_build_run.sh b/.copilot/image_build_run.sh index d5ac7534..d9fd09ac 100644 --- a/.copilot/image_build_run.sh +++ b/.copilot/image_build_run.sh @@ -4,12 +4,4 @@ set -e echo "Running post build script" - -echo "Renaming .env.ci to .env" -mv ".env.ci" ".env" - -cd src - -echo "Renaming .env to .env.ci" -cd ../ -mv ".env" ".env.ci" \ No newline at end of file +export $(grep -v '^#' .env.ci | xargs) \ No newline at end of file From afdf5fe114991bd04b3a24e0a101b5a83efc8f0f Mon Sep 17 00:00:00 2001 From: Ryan Williams Date: Thu, 7 Nov 2024 11:01:41 +0000 Subject: [PATCH 5/6] swapped out -full for base builder image, updated version number to match. --- .copilot/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.copilot/config.yml b/.copilot/config.yml index f60e3e79..3df4a694 100644 --- a/.copilot/config.yml +++ b/.copilot/config.yml @@ -1,4 +1,4 @@ repository: identity builder: - name: paketobuildpacks/builder-jammy-full + name: paketobuildpacks/builder-jammy-base version: 0.4.240 \ No newline at end of file From c3e7ea30f30d14973189dd66080a119bfe084cff Mon Sep 17 00:00:00 2001 From: Ryan Williams Date: Fri, 8 Nov 2024 15:11:54 +0000 Subject: [PATCH 6/6] switched back to -full for now --- .copilot/config.yml | 4 ++-- Procfile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.copilot/config.yml b/.copilot/config.yml index 3df4a694..fac4d850 100644 --- a/.copilot/config.yml +++ b/.copilot/config.yml @@ -1,4 +1,4 @@ repository: identity builder: - name: paketobuildpacks/builder-jammy-base - version: 0.4.240 \ No newline at end of file + name: paketobuildpacks/builder-jammy-full + version: 0.3.420 \ No newline at end of file diff --git a/Procfile b/Procfile index a9d71323..f07359e7 100644 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -web: python manage.py check --deploy && python manage.py migrate --noinput && python manage.py clearcache && python manage.py collectstatic --noinput && granian --interface wsgi config.wsgi:application --workers 4 --host 0.0.0.0 --port $PORT \ No newline at end of file +web: python manage.py check --deploy && python manage.py migrate --noinput && python manage.py clearcache && granian --interface wsgi config.wsgi:application --workers 4 --host 0.0.0.0 --port $PORT \ No newline at end of file