Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added celerybeat-schedule-shm
Binary file not shown.
Binary file added celerybeat-schedule-wal
Binary file not shown.
23 changes: 12 additions & 11 deletions cms/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,17 @@

LOGS_DIR = os.path.join(BASE_DIR, "logs")

try:
# keep a local_settings.py file for local overrides
from .local_settings import * # noqa

# ALLOWED_HOSTS needs a url/ip
ALLOWED_HOSTS.append(FRONTEND_HOST.replace("http://", "").replace("https://", ""))
except ImportError:
# local_settings not in use
pass


error_filename = os.path.join(LOGS_DIR, "debug.log")
if not os.path.exists(LOGS_DIR):
try:
Expand Down Expand Up @@ -398,7 +409,7 @@
},
}

DATABASES = {"default": {"ENGINE": "django.db.backends.postgresql", "NAME": "mediacms", "HOST": "127.0.0.1", "PORT": "5432", "USER": "mediacms", "PASSWORD": "mediacms", "OPTIONS": {'pool': True}}}
DATABASES = {"default": {"ENGINE": "django.db.backends.postgresql", "NAME": "mediacms", "HOST": "db", "PORT": "5432", "USER": "mediacms", "PASSWORD": "mediacms", "OPTIONS": {'pool': True}}}


REDIS_LOCATION = "redis://127.0.0.1:6379/1"
Expand Down Expand Up @@ -591,16 +602,6 @@
# show a custom text in the sidebar footer, otherwise the default will be shown if this is empty
SIDEBAR_FOOTER_TEXT = ""

try:
# keep a local_settings.py file for local overrides
from .local_settings import * # noqa

# ALLOWED_HOSTS needs a url/ip
ALLOWED_HOSTS.append(FRONTEND_HOST.replace("http://", "").replace("https://", ""))
except ImportError:
# local_settings not in use
pass

# Don't add new settings below that could be overridden in local_settings.py!!!

if "http" not in FRONTEND_HOST:
Expand Down
6 changes: 6 additions & 0 deletions deploy/docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,10 @@ find /home/mediacms.io/mediacms ! \( -path "*.git*" \) -exec chown www-data:$TAR

chmod +x /home/mediacms.io/mediacms/deploy/docker/start.sh /home/mediacms.io/mediacms/deploy/docker/prestart.sh

if [ -n "$LOGS_DIR" ]; then
mkdir -p "$LOGS_DIR"
chown -R www-data:root "$LOGS_DIR"
echo "Log directory created at $LOGS_DIR"
fi

exec "$@"
31 changes: 21 additions & 10 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,20 @@ version: "3"

services:
migrations:
image: mediacms/mediacms:latest
# image: mediacms/mediacms:latest
build: .
volumes:
- ./:/home/mediacms.io/mediacms/
environment:
LOGS_DIR: /home/mediacms.io/mediacms/custom_logs
ENABLE_UWSGI: 'no'
ENABLE_NGINX: 'no'
ENABLE_CELERY_SHORT: 'no'
ENABLE_CELERY_LONG: 'no'
ENABLE_CELERY_BEAT: 'no'
ADMIN_USER: 'admin'
ADMIN_EMAIL: 'admin@localhost'
# ADMIN_PASSWORD: 'uncomment_and_set_password_here'
ADMIN_PASSWORD: '' #enter an admin password here ('') for localhost
command: "./deploy/docker/prestart.sh"
restart: on-failure
depends_on:
Expand All @@ -22,45 +24,54 @@ services:
db:
condition: service_healthy
web:
image: mediacms/mediacms:latest
# image: mediacms/mediacms:latest
build: .
deploy:
replicas: 1
ports:
- "80:80"
volumes:
- ./:/home/mediacms.io/mediacms/
environment:
LOGS_DIR: /home/mediacms.io/mediacms/custom_logs
ENABLE_CELERY_BEAT: 'no'
ENABLE_CELERY_SHORT: 'no'
ENABLE_CELERY_LONG: 'no'
ENABLE_MIGRATIONS: 'no'
depends_on:
- migrations
db:
condition: service_healthy
celery_beat:
image: mediacms/mediacms:latest
# image: mediacms/mediacms:latest
build: .
volumes:
- ./:/home/mediacms.io/mediacms/
environment:
LOGS_DIR: /home/mediacms.io/mediacms/custom_logs
ENABLE_UWSGI: 'no'
ENABLE_NGINX: 'no'
ENABLE_CELERY_SHORT: 'no'
ENABLE_CELERY_LONG: 'no'
ENABLE_MIGRATIONS: 'no'
depends_on:
- redis
db:
condition: service_healthy
celery_worker:
image: mediacms/mediacms:latest
# image: mediacms/mediacms:latest
build: .
deploy:
replicas: 1
volumes:
- ./:/home/mediacms.io/mediacms/
environment:
LOGS_DIR: /home/mediacms.io/mediacms/custom_logs
ENABLE_UWSGI: 'no'
ENABLE_NGINX: 'no'
ENABLE_CELERY_BEAT: 'no'
ENABLE_MIGRATIONS: 'no'
depends_on:
- migrations
db:
condition: service_healthy
db:
image: postgres:17.2-alpine
volumes:
Expand All @@ -72,8 +83,8 @@ services:
POSTGRES_DB: mediacms
TZ: Europe/London
healthcheck:
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
interval: 10s
test: ["CMD-SHELL", "pg_isready -h localhost -U mediacms -d mediacms"]
interval: 5s
timeout: 5s
retries: 5
redis:
Expand Down
26 changes: 1 addition & 25 deletions static/jazzmin/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,10 @@ div.inline-related {
}

[class*=sidebar-dark-] .nav-header {
color: rgb(255,255,255,0.3);
margin-top: 1rem;
}

.nav-sidebar .nav-header {
font-size: 1.2rem !important
}
/* Table styles */
.table tr.form-row {
display: table-row;
Expand Down Expand Up @@ -185,15 +183,6 @@ table.dataTable thead .sorting_desc_disabled::after {
color: black;
}

.select2-container--admin-autocomplete .select2-results__option--highlighted[aria-selected] {
background-color: #0074f0 !important;
color: white !important;
}

.select2-container--default .select2-results__option--selected {
background-color: #ddd !important;
}

#changelist-search .form-group {
margin-bottom: .5em;
margin-right: .5em;
Expand Down Expand Up @@ -527,19 +516,6 @@ input[type="text"]
line-height: 1;
}

select#id_rbac_groups_from,
select#id_rbac_groups_to,
select#id_contributors_field_to,
select#id_contributors_field_from,
select#id_members_field_to,
select#id_members_field_from,
select#id_managers_field_to,
select#id_managers_field_from,
select#id_categories_to,
select#id_categories_from {
height: 285px !important;
}

/* Might need to import more rules from:
* https://github.com/django/django/blob/master/django/contrib/admin/static/admin/css/responsive.css
*/
Expand Down