config and readme

This commit is contained in:
Egor Matveev 2021-11-03 12:13:41 +03:00
parent 928cc4489d
commit 6bc184ed3e
3 changed files with 17 additions and 11 deletions

13
README.md Normal file
View File

@ -0,0 +1,13 @@
# Sprint
## Build
```
docker build -t sprint .
```
## Run
```
docker-compose up
```

View File

@ -11,11 +11,12 @@ https://docs.djangoproject.com/en/3.0/ref/settings/
""" """
import os import os
from config import *
# Build paths inside the project like this: os.path.join(BASE_DIR, ...) # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Quick-start development settings - unsuitable for production # Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/ # See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/
@ -29,10 +30,8 @@ DEBUG = not DEPLOY
SECURE_SSL_REDIRECT = DEPLOY SECURE_SSL_REDIRECT = DEPLOY
ALLOWED_HOSTS = ["*"] ALLOWED_HOSTS = ["*"]
# Application definition # Application definition
INSTALLED_APPS = [ INSTALLED_APPS = [
@ -77,7 +76,6 @@ TEMPLATES = [
WSGI_APPLICATION = "Sprint.wsgi.application" WSGI_APPLICATION = "Sprint.wsgi.application"
# Database # Database
# https://docs.djangoproject.com/en/3.0/ref/settings/#databases # https://docs.djangoproject.com/en/3.0/ref/settings/#databases
@ -92,7 +90,6 @@ DATABASES = {
} }
} }
# Password validation # Password validation
# https://docs.djangoproject.com/en/3.0/ref/settings/#auth-password-validators # https://docs.djangoproject.com/en/3.0/ref/settings/#auth-password-validators
@ -111,7 +108,6 @@ AUTH_PASSWORD_VALIDATORS = [
}, },
] ]
# Internationalization # Internationalization
# https://docs.djangoproject.com/en/3.0/topics/i18n/ # https://docs.djangoproject.com/en/3.0/topics/i18n/
@ -129,7 +125,6 @@ USE_L10N = True
USE_TZ = True USE_TZ = True
# Static files (CSS, JavaScript, Images) # Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/3.0/howto/static-files/ # 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") DATA_ROOT = os.path.join(BASE_DIR, "data")
SOLUTIONS_ROOT = os.path.join(DATA_ROOT, "solutions") SOLUTIONS_ROOT = os.path.join(DATA_ROOT, "solutions")
SOLUTIONS_ROOT_EXTERNAL = "/Users/egormatveev/Sprint/data/solutions"
RABBIT_HOST = "rabbitmq" RABBIT_HOST = "rabbitmq"
RABBIT_PORT = 5672 RABBIT_PORT = 5672
STATICFILES_DIRS = [ STATICFILES_DIRS = [
os.path.join(BASE_DIR, "Main/static"), os.path.join(BASE_DIR, "Main/static"),
] ]
# Authentication backends # Authentication backends
AUTHENTICATION_BACKENDS = ("django.contrib.auth.backends.ModelBackend",) AUTHENTICATION_BACKENDS = ("django.contrib.auth.backends.ModelBackend",)

2
config.py Normal file
View File

@ -0,0 +1,2 @@
SOLUTIONS_ROOT_EXTERNAL = "/Users/egormatveev/Sprint/data/solutions"
DEPLOY = False