Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overwriting default repository static assets on deployment #1996

Open
alistairewj opened this issue May 9, 2023 · 0 comments · May be fixed by #2006
Open

Overwriting default repository static assets on deployment #1996

alistairewj opened this issue May 9, 2023 · 0 comments · May be fixed by #2006
Assignees

Comments

@alistairewj
Copy link
Member

alistairewj commented May 9, 2023

Spurred on by #1989 and #1995 (potentially also spurned), we discussed how best to overwrite static content for custom deployments. Mainly impacts the background/favicon

We should rely on collectstatic and add in an appropriate STATICFILES_DIRS.

Currently it's set here in the base settings:

STATICFILES_DIRS = [os.path.join(BASE_DIR,'static')]

Seems like we could change this to something like:

STATICFILES_DIRS = [
    os.path.join(BASE_DIR, 'static'),
    os.path.join(BASE_DIR, 'static-overrides'),
]

Then we'd just have a .gitignore in static-overrides and let repos store non version controlled content there

@amitupreti amitupreti self-assigned this May 10, 2023
amitupreti added a commit to T-CAIREM/physionet-build that referenced this issue May 17, 2023
As discussed on MIT-LCP#1996,
we are making the theme customizable for deployment
by .env configuration. This lead us modifying existing css files
adding configurable image files.
This folder should be used to store deployment specific
static files.

It is expected that compilestatic will be ran first(which will
generate the css, image files and store them to the static-override folder),
and then collectstatic will be ran which will collect static files
from static and static-override directories

Note that, the `static-overrides` comes before the `static` on base.py
This is intentional to make sure `static-overrides` is given
first priority if there are same file in these two directories.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants