From 6bc184ed3ed67435ed25b696fb2d49396727ef71 Mon Sep 17 00:00:00 2001 From: Egor Matveev Date: Wed, 3 Nov 2021 12:13:41 +0300 Subject: [PATCH] config and readme --- README.md | 13 +++++++++++++ Sprint/settings.py | 13 ++----------- config.py | 2 ++ 3 files changed, 17 insertions(+), 11 deletions(-) create mode 100644 README.md create mode 100644 config.py diff --git a/README.md b/README.md new file mode 100644 index 0000000..2ea2a4e --- /dev/null +++ b/README.md @@ -0,0 +1,13 @@ +# Sprint + +## Build + +``` +docker build -t sprint . +``` + +## Run + +``` +docker-compose up +``` \ No newline at end of file diff --git a/Sprint/settings.py b/Sprint/settings.py index 60efeb2..101b734 100644 --- a/Sprint/settings.py +++ b/Sprint/settings.py @@ -11,11 +11,12 @@ https://docs.djangoproject.com/en/3.0/ref/settings/ """ import os +from config import * + # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) - # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/ @@ -29,10 +30,8 @@ DEBUG = not DEPLOY SECURE_SSL_REDIRECT = DEPLOY - ALLOWED_HOSTS = ["*"] - # Application definition INSTALLED_APPS = [ @@ -77,7 +76,6 @@ TEMPLATES = [ WSGI_APPLICATION = "Sprint.wsgi.application" - # Database # https://docs.djangoproject.com/en/3.0/ref/settings/#databases @@ -92,7 +90,6 @@ DATABASES = { } } - # Password validation # https://docs.djangoproject.com/en/3.0/ref/settings/#auth-password-validators @@ -111,7 +108,6 @@ AUTH_PASSWORD_VALIDATORS = [ }, ] - # Internationalization # https://docs.djangoproject.com/en/3.0/topics/i18n/ @@ -129,7 +125,6 @@ USE_L10N = True USE_TZ = True - # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/3.0/howto/static-files/ @@ -141,17 +136,13 @@ MEDIA_ROOT = os.path.join(BASE_DIR, "media") DATA_ROOT = os.path.join(BASE_DIR, "data") SOLUTIONS_ROOT = os.path.join(DATA_ROOT, "solutions") -SOLUTIONS_ROOT_EXTERNAL = "/Users/egormatveev/Sprint/data/solutions" - RABBIT_HOST = "rabbitmq" RABBIT_PORT = 5672 - STATICFILES_DIRS = [ os.path.join(BASE_DIR, "Main/static"), ] - # Authentication backends AUTHENTICATION_BACKENDS = ("django.contrib.auth.backends.ModelBackend",) diff --git a/config.py b/config.py new file mode 100644 index 0000000..16be9ce --- /dev/null +++ b/config.py @@ -0,0 +1,2 @@ +SOLUTIONS_ROOT_EXTERNAL = "/Users/egormatveev/Sprint/data/solutions" +DEPLOY = False