mirror of
https://github.com/mediacms-io/mediacms.git
synced 2026-06-07 09:24:20 -04:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b11f2f561c | |||
| b6da9c4662 | |||
| 10c0782fe0 | |||
| 318dad0e5d |
@@ -37,3 +37,4 @@ frontend-tools/chapters-editor/client/public/videos/sample-video.mp3
|
||||
static/chapters_editor/videos/sample-video.mp3
|
||||
static/video_editor/videos/sample-video.mp3
|
||||
templates/todo-MS4.md
|
||||
.secret_key
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# Changelog
|
||||
|
||||
## [8.0.5](https://github.com/mediacms-io/mediacms/compare/v8.0.4...v8.0.5) (2026-05-11)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* add secret key to gitignore ([b6da9c4](https://github.com/mediacms-io/mediacms/commit/b6da9c4662b3fba234b8dc69700ffa44fced7482))
|
||||
|
||||
## [8.0.4](https://github.com/mediacms-io/mediacms/compare/v8.0.3...v8.0.4) (2026-05-11)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* docker compose settings, provide key ([318dad0](https://github.com/mediacms-io/mediacms/commit/318dad0e5d2512d68068c019eb87f942f83318e9))
|
||||
|
||||
## [8.0.3](https://github.com/mediacms-io/mediacms/compare/v8.0.2...v8.0.3) (2026-05-11)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
+23
-3
@@ -173,9 +173,29 @@ REST_FRAMEWORK = {
|
||||
|
||||
|
||||
# Set the SECRET_KEY env var in production. If unset, a fresh random key is
|
||||
# generated per process — safe but invalidates sessions and signed tokens on
|
||||
# every restart.
|
||||
SECRET_KEY = os.getenv("SECRET_KEY") or get_random_secret_key()
|
||||
# generated or read from a .secret_key file to ensure all workers share the same key.
|
||||
def get_secret_key():
|
||||
key = os.getenv('SECRET_KEY')
|
||||
if key:
|
||||
return key
|
||||
|
||||
base_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
secret_path = os.path.join(base_dir, '.secret_key')
|
||||
|
||||
if os.path.exists(secret_path):
|
||||
with open(secret_path) as f:
|
||||
return f.read().strip()
|
||||
|
||||
key = get_random_secret_key()
|
||||
try:
|
||||
with open(secret_path, 'w') as f:
|
||||
f.write(key)
|
||||
except Exception:
|
||||
pass
|
||||
return key
|
||||
|
||||
|
||||
SECRET_KEY = get_secret_key()
|
||||
|
||||
TEMP_DIRECTORY = "/tmp" # Don't use a temp directory inside BASE_DIR!!!
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
VERSION = "8.0.3"
|
||||
VERSION = "8.0.4"
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
import os
|
||||
|
||||
from django.core.management.utils import get_random_secret_key
|
||||
|
||||
FRONTEND_HOST = os.getenv('FRONTEND_HOST', 'http://localhost')
|
||||
PORTAL_NAME = os.getenv('PORTAL_NAME', 'MediaCMS')
|
||||
SECRET_KEY = os.getenv('SECRET_KEY') or get_random_secret_key()
|
||||
REDIS_LOCATION = os.getenv('REDIS_LOCATION', 'redis://redis:6379/1')
|
||||
|
||||
DATABASES = {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mediacms",
|
||||
"version": "8.0.3",
|
||||
"version": "8.0.5",
|
||||
"devDependencies": {
|
||||
"@semantic-release/changelog": "^6.0.3",
|
||||
"@semantic-release/git": "^10.0.1",
|
||||
|
||||
Reference in New Issue
Block a user