From 985e86a8138c893b57b9c47dd3a14b0e04e7f612 Mon Sep 17 00:00:00 2001 From: Wesley B <62723358+wesleyboar@users.noreply.github.com> Date: Mon, 9 Dec 2024 18:24:32 -0600 Subject: [PATCH] fix: settings dirs, `type:bind` `read_only:true` Verbose config way to stop creation of empty directories. Drawback: Error if files do not exist. --- docs/customize-cms.md | 11 ---------- .../docker/docker-compose-dev.all.debug.yml | 20 +++++++++++++++---- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/docs/customize-cms.md b/docs/customize-cms.md index 7683d4f3e..cc75d5e4c 100644 --- a/docs/customize-cms.md +++ b/docs/customize-cms.md @@ -6,17 +6,6 @@ This is all optional. You can develop Core-Portal without CMS customization. To create your own CMS test **content**, [learn Django CMS as we use it](https://tacc-main.atlassian.net/wiki/x/phdv). -To be able to customize CMS **settings** or **secrets**: -1. Run `make stop`. -2. Delete `server/conf/cms/settings_*.py` **directories**. -3. Create CMS settings files: - ```sh - touch server/conf/cms/settings_custom.py - touch server/conf/cms/secrets.py - touch server/conf/cms/settings_local.py - ``` -4. Run `make start`. - To **emulate** a specific project's CMS **settings**: 1. Visit https://github.com/TACC/Core-Portal-Resources/blob/main/. 2. Navigate to specific project. diff --git a/server/conf/docker/docker-compose-dev.all.debug.yml b/server/conf/docker/docker-compose-dev.all.debug.yml index af0430f83..290c89f4a 100644 --- a/server/conf/docker/docker-compose-dev.all.debug.yml +++ b/server/conf/docker/docker-compose-dev.all.debug.yml @@ -6,10 +6,22 @@ services: cms: image: taccwma/core-cms:feat-CMD-194-customize-core-cms-in-core-portal volumes: - - ../cms/settings/settings_default.py:/code/taccsite_cms/settings_default.py - - ../cms/settings/settings_custom.py:/code/taccsite_cms/settings_custom.py - - ../cms/settings/secrets.py:/code/taccsite_cms/secrets.py - - ../cms/settings/settings_local.py:/code/taccsite_cms/settings_local.py + - type: bind + source: ../cms/settings/settings_default.py + target: /code/taccsite_cms/settings_default.py + read_only: true + - type: bind + source: ../cms/settings/settings_custom.py + target: /code/taccsite_cms/settings_custom.py + read_only: true + - type: bind + source: ../cms/settings/secrets.py + target: /code/taccsite_cms/secrets.py + read_only: true + - type: bind + source: ../cms/settings/settings_local.py + target: /code/taccsite_cms/settings_local.py + read_only: true - ../cms/uwsgi/uwsgi.ini:/code/uwsgi.ini - ../../cms/static:/code/static - ../../cms/media:/code/media