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

1
.gitignore vendored
View File

@ -9,3 +9,4 @@ celerybeat-schedule
databasepostgresql_env databasepostgresql_env
ssh-private.key ssh-private.key
ssh-public.key ssh-public.key
certbot

View File

@ -1,5 +1,5 @@
## Demo Project Link ## Demo Project Link
https://ayxan.pythonanywhere.com https://series-notification.online
## Installition for Dev ## Installition for Dev
**pip install -r requirements.txt<br /> **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" - "80:80"
- "443:443" - "443:443"
volumes: 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/conf:/etc/letsencrypt
- ./config/certbot/www:/var/www/certbot - ./config/certbot/www:/var/www/certbot
- static_volume:/django_static - static_volume:/django_static
depends_on: depends_on:
- django - 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: certbot:
image: certbot/certbot image: certbot/certbot
volumes: volumes:
- ./config/certbot/conf:/etc/letsencrypt - ./config/certbot/conf:/etc/letsencrypt
- ./config/certbot/www:/var/www/certbot - ./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: volumes:
dbdata: dbdata:

View File

@ -3,9 +3,9 @@ from .base import *
DEBUG = True 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 = { DATABASES = {
'default': { 'default': {