diff --git a/docker-compose.yml b/docker-compose.yml index ce42c65..b9863b9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,11 +12,12 @@ services: environment: - DJANGO_SETTINGS_MODULE=config.settings.production build: . - command: python3 src/manage.py runserver 0.0.0.0:8000 --settings=config.settings.production + command: gunicorn --chdir src --bind 0.0.0.0:8000 config.wsgi ports: - "8000:8000" depends_on: - db + - rabbitmq volumes: - static_volume:/django_static diff --git a/src/config/settings/development.py b/src/config/settings/development.py index d7ae878..3534d60 100644 --- a/src/config/settings/development.py +++ b/src/config/settings/development.py @@ -5,6 +5,8 @@ DEBUG = True ALLOWED_HOSTS = ['*'] +CSRF_TRUSTED_ORIGINS=['http://127.0.0.1:1337'] + DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', diff --git a/src/config/settings/production.py b/src/config/settings/production.py index 25e8a13..414077d 100644 --- a/src/config/settings/production.py +++ b/src/config/settings/production.py @@ -5,6 +5,8 @@ DEBUG = True ALLOWED_HOSTS = ['*'] +CSRF_TRUSTED_ORIGINS=['http://127.0.0.1:1337'] + DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2',