From da96abab967a13dd67ca2e5d4c9834f79cac4804 Mon Sep 17 00:00:00 2001 From: Blake Mason Date: Mon, 11 Mar 2024 10:21:20 -0700 Subject: [PATCH 1/4] [C] Removes sample .env file - Use of .env file in this repo is deprecated so no sense in keeping the sample file --- .env.sample | 59 ----------------------------------------------------- 1 file changed, 59 deletions(-) delete mode 100644 .env.sample diff --git a/.env.sample b/.env.sample deleted file mode 100644 index 465f1721..00000000 --- a/.env.sample +++ /dev/null @@ -1,59 +0,0 @@ -ENVIRONMENT=dev -SECURITY_KEY= - -# For Craft Postgres DB -DB_DSN=pgsql:host=postgres;dbname=craft -DB_SERVER=postgres -DB_NAME= -DB_USER= -DB_PASSWORD= -DB_DATABASE= -DB_SCHEMA=public -DB_DRIVER=pgsql -DB_PORT=5432 - -ENABLE_MEMCACHED="true" -MEMCACHED_IP=cache - -# For Google Storage Assets -GCP_PROJECT_ID= -GCS_GENERAL_BUCKET= -GCS_HEROES_BUCKET= -GCS_CONTENT_BUCKET= -GCS_CALLOUTS_BUCKET= -GCS_STAFF_BUCKET= - -# For required and custom Craft aliases -PRIMARY_SITE_URL=http://localhost:8080 -WEB_BASE_URL=http://localhost:3000 -ALIAS_PREVIEW_URL_FORMAT=http://localhost:3000/api/preview?site={site}&entryUid={sourceUid} - -# For AWS Assets -AWS_ASSET_KEY_ID= -AWS_ASSET_SECRET_KEY= -AWS_ASSET_S3_BUCKET= -AWS_ASSET_S3_REGION= -AWS_ASSET_S3_ASSET_VARIANT_SUBFOLDER= - -# For contact form -EMAIL_FROM_ADDRESS= -EMAIL_REPLY_TO_ADDRESS= -EMAIL_SENDER_NAME= -EMAIL_HTML_EMAIL_TEMPLATE= - -EMAIL_SMTP_HOST_NAME= -EMAIL_SMTP_PORT= -EMAIL_SMTP_USERNAME= -EMAIL_SMTP_PASSWORD= - -# For GraphQL Authentication -GOOGLE_APP_ID= -GOOGLE_APP_SECRET= - -FACEBOOK_APP_ID= -FACEBOOK_APP_SECRET= -FACEBOOK_APP_REDIRECT_URL= - -# FE User account management paths -VERIFY_EMAIL_PATH=http://localhost:3000/?activate=true -SET_PASSWORD_PATH=http://localhost:3000/?set_password=true From b2d4439bdbce26258719229cb243ae1af79881ba Mon Sep 17 00:00:00 2001 From: Blake Mason Date: Mon, 11 Mar 2024 10:23:21 -0700 Subject: [PATCH 2/4] [C] Renames make command for consistency with client yarn scripts --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index abe659f0..b77ca204 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -start: +dev: docker-compose -f docker-compose-local-db.yml up --build clean: From c7fe2318a0f9e8a73f9bc5ddf43e07c3397bccd7 Mon Sep 17 00:00:00 2001 From: Eric Rosas Date: Mon, 11 Mar 2024 13:02:18 -0600 Subject: [PATCH 3/4] Updated `Makefile` with DB scripts Updated `Makefile` with DB scripts --- Makefile | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b77ca204..cee71afc 100644 --- a/Makefile +++ b/Makefile @@ -5,4 +5,23 @@ clean: docker system prune -f && docker volume prune -f clean-images: - docker images pruneM \ No newline at end of file + docker images prune + +# Requires argument `dbname` to specify the name of the new DB, usage: `make local-db dbname=my_db` +local-db: + cd db && docker exec --workdir / rubin-obs-api-postgres-1 psql -U craft -c "create database $(dbname);" + cd db && docker exec --workdir / rubin-obs-api-postgres-1 psql -U craft -d $(dbname) -f inv_mar.sql + echo "\n\n\n\nDon't forget to update your docker-compose-local-db.yaml with the DB name: $(dbname)" + +db-list: + cd db && docker exec --workdir / rubin-obs-api-postgres-1 psql -U craft -c "SELECT (pg_stat_file('base/'||oid ||'/PG_VERSION')).modification, datname FROM pg_database;" + +cloud-db-list: + curl https://us-central1-edc-prod-eef0.cloudfunctions.net/sql-helper/databases\?project\=rubinobs + +# Requires argument `dbname` to specify the name of the DB to be exported, usage: `make cloud-db-export dbname=prod_db` +cloud-db-export: + curl --header "Content-Type: application/json" \ + --request POST \ + --data '{"project":"rubinobs"}' \ + https://us-central1-edc-prod-eef0.cloudfunctions.net/sql-helper/databases\?action\=export\&database\=$(dbname) \ No newline at end of file From 76a45aea6e31406a4fc4d7a2c6bbe823ed49ced1 Mon Sep 17 00:00:00 2001 From: Blake Mason Date: Tue, 12 Mar 2024 13:32:44 -0700 Subject: [PATCH 4/4] [F] Entry Callouts have auto-generated title fallback --- ...-e74470ea-c559-482e-9e3d-2241517a95a7.yaml | 6 +- ...-46db7366-f372-41c2-9f6a-dc30bcd7a946.yaml | 6 +- ...-23eda090-7e8e-401d-ab49-ee4becc34935.yaml | 79 ++++++++++++++++--- api/config/project/project.yaml | 2 +- 4 files changed, 80 insertions(+), 13 deletions(-) diff --git a/api/config/project/entryTypes/calloutEvent--e74470ea-c559-482e-9e3d-2241517a95a7.yaml b/api/config/project/entryTypes/calloutEvent--e74470ea-c559-482e-9e3d-2241517a95a7.yaml index 653cd237..116ad875 100644 --- a/api/config/project/entryTypes/calloutEvent--e74470ea-c559-482e-9e3d-2241517a95a7.yaml +++ b/api/config/project/entryTypes/calloutEvent--e74470ea-c559-482e-9e3d-2241517a95a7.yaml @@ -12,6 +12,7 @@ fieldLayouts: disabled: false elementCondition: null id: null + inputType: null instructions: null label: null max: null @@ -67,7 +68,10 @@ handle: calloutEvent hasTitleField: false name: 'Callout - Event' section: 7cad6f4e-cc7b-45cf-ac7b-6f383e77bc1b # Callouts +showStatusField: true +slugTranslationKeyFormat: null +slugTranslationMethod: site sortOrder: 5 -titleFormat: '{eventEntry|first.title}' +titleFormat: '{{eventEntry|first.title ?? "Event Callout #{id} has Pending Event Post"}}' titleTranslationKeyFormat: null titleTranslationMethod: none diff --git a/api/config/project/entryTypes/calloutNews--46db7366-f372-41c2-9f6a-dc30bcd7a946.yaml b/api/config/project/entryTypes/calloutNews--46db7366-f372-41c2-9f6a-dc30bcd7a946.yaml index 36fab24f..0fbed29a 100644 --- a/api/config/project/entryTypes/calloutNews--46db7366-f372-41c2-9f6a-dc30bcd7a946.yaml +++ b/api/config/project/entryTypes/calloutNews--46db7366-f372-41c2-9f6a-dc30bcd7a946.yaml @@ -12,6 +12,7 @@ fieldLayouts: disabled: false elementCondition: null id: null + inputType: null instructions: null label: null max: null @@ -67,7 +68,10 @@ handle: calloutNews hasTitleField: false name: 'Callout - News' section: 7cad6f4e-cc7b-45cf-ac7b-6f383e77bc1b # Callouts +showStatusField: true +slugTranslationKeyFormat: null +slugTranslationMethod: site sortOrder: 4 -titleFormat: '{newsEntry|first.title}' +titleFormat: '{{newsEntry|first.title ?? "News Callout #{id} has Pending News Post"}}' titleTranslationKeyFormat: null titleTranslationMethod: none diff --git a/api/config/project/entryTypes/pages--23eda090-7e8e-401d-ab49-ee4becc34935.yaml b/api/config/project/entryTypes/pages--23eda090-7e8e-401d-ab49-ee4becc34935.yaml index 3a995eba..a0234b40 100644 --- a/api/config/project/entryTypes/pages--23eda090-7e8e-401d-ab49-ee4becc34935.yaml +++ b/api/config/project/entryTypes/pages--23eda090-7e8e-401d-ab49-ee4becc34935.yaml @@ -2,14 +2,29 @@ fieldLayouts: 4cb617a1-f4f9-4f4f-ae58-c44be48749b8: tabs: - + elementCondition: null elements: + - + elementCondition: null + fieldUid: fd2b2124-15e6-4d4c-ae80-2df159c56102 + instructions: null + label: null + required: false + tip: null + type: craft\fieldlayoutelements\CustomField + uid: 96a04f89-11d0-4826-93ac-c78b998fd6ce + userCondition: null + warning: null + width: 100 - autocapitalize: true autocomplete: false autocorrect: true class: null disabled: false + elementCondition: null id: null + inputType: null instructions: null label: Title max: null @@ -24,126 +39,170 @@ fieldLayouts: tip: null title: null type: craft\fieldlayoutelements\entries\EntryTitleField + uid: 3bdf853b-7e60-4ed9-94fa-0314f8b6142b + userCondition: null warning: null width: 75 - + elementCondition: null fieldUid: 831db889-442e-4553-9076-fc3bc2843c8c # Hide title instructions: null label: null required: false tip: null type: craft\fieldlayoutelements\CustomField + uid: 45355d01-e9b1-4878-94e0-4da8b1a61d94 + userCondition: null warning: null width: 25 - + elementCondition: null fieldUid: cd801712-4ba3-4a9c-8fab-0d3e2a58b4eb # Description - instructions: '' - label: '' - required: '' + instructions: null + label: null + required: false tip: null type: craft\fieldlayoutelements\CustomField + uid: 7efc90f5-a48d-4b0d-8a0a-a244dd0e5122 + userCondition: null warning: null width: 100 - + elementCondition: null fieldUid: 3c9eb8f7-9f84-4c22-84d5-531be77aa6b6 # Featured Image - instructions: '' - label: '' - required: '' + instructions: null + label: null + required: false tip: null type: craft\fieldlayoutelements\CustomField + uid: c8d5a76f-2593-450a-9ba0-ff762c6faa1b + userCondition: null warning: null width: 100 - + elementCondition: null fieldUid: 05eead62-7bf9-43e4-a7e8-bcd8f9f77323 # Hero instructions: null label: null required: false tip: null type: craft\fieldlayoutelements\CustomField + uid: 19686067-1981-4b39-a69e-b02ad1615184 + userCondition: null warning: null width: 75 - + elementCondition: null fieldUid: 00f1f9f6-c710-431d-bf34-22e3a62d5172 # Overlap Hero instructions: null label: null required: false tip: null type: craft\fieldlayoutelements\CustomField + uid: dbe6283e-7209-4f5f-901f-43cbe7e17b2c + userCondition: null warning: null width: 25 - + elementCondition: null fieldUid: 72e5075a-9b06-4674-b040-615f4a6f7b70 # Content Blocks - Pages instructions: null label: null required: false tip: null type: craft\fieldlayoutelements\CustomField + uid: 79ca0ab4-0876-457b-8d0d-f3f4f1149a5b + userCondition: null warning: null width: 100 - + elementCondition: null fieldUid: 8b5bcbee-1883-48ca-8c9a-6c506b9abb99 # Page Type instructions: null label: null required: false tip: null type: craft\fieldlayoutelements\CustomField + uid: f61bfa86-f6a3-4c96-b31d-6179f6ca2ea6 + userCondition: null warning: null width: 100 - + elementCondition: null fieldUid: fa690eba-6d46-4a5e-9dcd-0845f5b56c1b # Dynamic Component instructions: null label: null required: false tip: null type: craft\fieldlayoutelements\CustomField + uid: e22ea8f3-dab3-477b-be8f-ab108bbb198c + userCondition: null warning: null width: 100 name: Pages - sortOrder: 1 + uid: 66f942b9-81ec-4903-a8e1-e1643e3dd326 + userCondition: null - + elementCondition: null elements: - + elementCondition: null fieldUid: 7970cd65-7a96-418a-8581-d6df4e039e6d # Plain Text - instructions: '' + instructions: null label: 'Sub Hero Header' - required: '' + required: false tip: null type: craft\fieldlayoutelements\CustomField + uid: f6dd7af0-e8cd-41b4-b953-29851d683273 + userCondition: null warning: null width: 75 - + elementCondition: null fieldUid: d7fc5f39-2426-421b-bd0b-10aadae80ae3 # Color Scheme instructions: null label: null required: false tip: null type: craft\fieldlayoutelements\CustomField + uid: 52a59c83-401e-4e15-9cae-53b69664b951 + userCondition: null warning: null width: 25 - + elementCondition: null fieldUid: 24f23fec-fc66-46f8-86e1-396d01315ad2 # Sub Hero Text instructions: null label: null required: false tip: null type: craft\fieldlayoutelements\CustomField + uid: 7f4711e5-d00d-4b37-a9dc-7ba3a1001b96 + userCondition: null warning: null width: 100 - + elementCondition: null fieldUid: 6e888efc-ab7a-4c15-9ec5-5954b52984ca # Show Sibling Nav instructions: null label: null required: false tip: null type: craft\fieldlayoutelements\CustomField + uid: cc6de1c0-8c10-4230-8b62-f8a90bea1d51 + userCondition: null warning: null width: 100 name: 'Sub Hero Content' - sortOrder: 2 + uid: e5c027d9-f9db-4aab-bc41-55ab4bf0ace3 + userCondition: null handle: pages hasTitleField: true name: Pages section: f1b8c943-bc12-4001-9e2a-d531379f1aaf # Pages +showStatusField: true +slugTranslationKeyFormat: null +slugTranslationMethod: site sortOrder: 1 titleFormat: null titleTranslationKeyFormat: null diff --git a/api/config/project/project.yaml b/api/config/project/project.yaml index 7b8651ed..a7890e27 100644 --- a/api/config/project/project.yaml +++ b/api/config/project/project.yaml @@ -1,4 +1,4 @@ -dateModified: 1709746311 +dateModified: 1710275371 email: fromEmail: $EMAIL_FROM_ADDRESS fromName: $EMAIL_SENDER_NAME