Fixed SSH

This commit is contained in:
ayxan 2022-10-15 00:02:23 +00:00
parent 5e5c1800c7
commit 4f795b628f
5 changed files with 8 additions and 47 deletions

3
.gitignore vendored
View File

@ -8,4 +8,5 @@ Backup-codes-series.notification.txt
celerybeat-schedule
databasepostgresql_env
ssh-private.key
ssh-public.key
ssh-public.key
certbot

View File

@ -1,5 +1,5 @@
## Demo Project Link
https://ayxan.pythonanywhere.com
https://series-notification.online
## Installition for Dev
**pip install -r requirements.txt<br />

View File

@ -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:

View File

@ -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:

View File

@ -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': {