diff --git a/BH/settings.py b/BH/settings.py index 95d5d97..9179c00 100644 --- a/BH/settings.py +++ b/BH/settings.py @@ -25,11 +25,9 @@ DEFAULT_AUTO_FIELD='django.db.models.AutoField' # Load the Env load_dotenv() -# SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = os.getenv('SECRET_KEY') -# SECURITY WARNING: don't run with debug turned on in production! -DEBUG = False +DEBUG = os.environ.get('DEBUG', 'False') == 'True' ALLOWED_HOSTS = ['localhost', '127.0.0.1', 'beyond-heroes.com', 'www.beyond-heroes.com'] @@ -40,7 +38,7 @@ INSTALLED_APPS = [ 'crispy_forms', 'crispy_bootstrap4', 'blog.apps.BlogConfig', - 'users.apps.UsersConfig', + 'users', 'api.apps.APIConfig', 'django.contrib.admin', 'django.contrib.auth', diff --git a/Dockerfile b/Dockerfile index 3e9c5a0..71405da 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,5 +30,5 @@ EXPOSE 3030 # Define environment variable for Gunicorn ENV GUNICORN_CMD_ARGS="--bind 0.0.0.0:3030" -# Run Gunicorn server with your Django application -CMD ["gunicorn", "BH.wsgi:application"] +# Collect static files and run Gunicorn +CMD ["sh", "-c", "python manage.py collectstatic --noinput && gunicorn BH.wsgi:application"] diff --git a/blog/migrations/0002_alter_blog_id_alter_post_id.py b/blog/migrations/0002_alter_blog_id_alter_post_id.py deleted file mode 100644 index 2bdeec9..0000000 --- a/blog/migrations/0002_alter_blog_id_alter_post_id.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 5.2.9 on 2026-02-19 10:09 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('blog', '0001_initial'), - ] - - operations = [ - migrations.AlterField( - model_name='blog', - name='id', - field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'), - ), - migrations.AlterField( - model_name='post', - name='id', - field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'), - ), - ] diff --git a/templates/base.html b/templates/base.html index b67ce7c..2ce3abc 100644 --- a/templates/base.html +++ b/templates/base.html @@ -10,6 +10,7 @@ +