diff --git a/.gitignore b/.gitignore index 6ac8fa1..483e283 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,5 @@ Backup-codes-series.notification.txt celerybeat-schedule databasepostgresql_env ssh-private.key -ssh-public.key \ No newline at end of file +ssh-public.key +certbot \ No newline at end of file diff --git a/README.md b/README.md index 80eb712..f838605 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ ## Demo Project Link -https://ayxan.pythonanywhere.com +https://series-notification.online ## Installition for Dev **pip install -r requirements.txt
diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml deleted file mode 100644 index 901197a..0000000 --- a/docker-compose-dev.yml +++ /dev/null @@ -1,40 +0,0 @@ -version: "3.9" - -services: - db: - image: postgres - volumes: - - dbdata:/var/lib/postgresql/data - env_file: - - config/db/databasepostgresql_env - - rabbitmq: - image: rabbitmq - - django: - restart: always - environment: - - DJANGO_SETTINGS_MODULE=config.settings.production - build: . - command: gunicorn --chdir src --bind 0.0.0.0:8000 config.wsgi - ports: - - "8000:8000" - depends_on: - - db - - rabbitmq - volumes: - - static_volume:/django_static - - nginx: - image: nginx - ports: - - "1337:8080" - volumes: - - ./config/nginx/local.conf:/etc/nginx/conf.d/default.conf:ro - - static_volume:/django_static - depends_on: - - django - -volumes: - dbdata: - static_volume: \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 1865e57..818fd31 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -31,20 +31,20 @@ services: - "80:80" - "443:443" volumes: - - ./config/nginx/local.conf:/etc/nginx/conf.d/default.conf:ro + - ./config/nginx/server.conf:/etc/nginx/conf.d/default.conf:ro - ./config/certbot/conf:/etc/letsencrypt - ./config/certbot/www:/var/www/certbot - static_volume:/django_static depends_on: - django - # command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'" + command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'" certbot: image: certbot/certbot volumes: - ./config/certbot/conf:/etc/letsencrypt - ./config/certbot/www:/var/www/certbot - # entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'" + entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'" volumes: dbdata: diff --git a/src/config/settings/production.py b/src/config/settings/production.py index 2c1a6a3..aa9b041 100644 --- a/src/config/settings/production.py +++ b/src/config/settings/production.py @@ -3,9 +3,9 @@ from .base import * DEBUG = True -ALLOWED_HOSTS = ['www.series-notification.online', 'www.series-notification.online', '130.61.19.69'] +ALLOWED_HOSTS = ['series-notification.online', 'www.series-notification.online'] -# CSRF_TRUSTED_ORIGINS=['http://127.0.0.1:80'] +CSRF_TRUSTED_ORIGINS=['https://series-notification.online'] DATABASES = { 'default': {