add dockerfiles

This commit is contained in:
zema1
2017-10-23 20:59:44 +08:00
parent 1b0952cd0d
commit e8841eae82
13 changed files with 67 additions and 65 deletions

View File

@@ -26,6 +26,8 @@ ALLOWED_HOSTS = ["*"]
TEST_CASE_DIR = "/tmp"
LOG_PATH = "/tmp/"
STATICFILES_DIRS = [
os.path.join(BASE_DIR, "static"),
]

View File

@@ -8,11 +8,11 @@ def get_env(name, default=""):
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'HOST': get_env("POSTGRESQL_HOST", "postgresql"),
'PORT': get_env("POSTGRESQL_PORT", "5433"),
'NAME': get_env("POSTGRESQL_DBNAME"),
'USER': get_env("POSTGRESQL_USER"),
'PASSWORD': get_env("POSTGRESQL_PASSWORD")
'HOST': get_env("POSTGRES_HOST", "postgres"),
'PORT': get_env("POSTGRES_PORT", "5433"),
'NAME': get_env("POSTGRES_DB"),
'USER': get_env("POSTGRES_USER"),
'PASSWORD': get_env("POSTGRES_PASSWORD")
}
}
@@ -25,4 +25,5 @@ DEBUG = False
ALLOWED_HOSTS = ['*']
TEST_CASE_DIR = "/test_case"
TEST_CASE_DIR = "/app/test_case"
LOG_PATH = "log/"

View File

@@ -13,7 +13,7 @@ import os
from .custom_settings import *
if os.environ.get("NODE_ENV") == "production":
if os.environ.get("OJ_ENV") == "production":
from .production_settings import *
else:
from .dev_settings import *
@@ -108,7 +108,6 @@ USE_TZ = True
STATIC_URL = '/static/'
AUTH_USER_MODEL = 'account.User'
LOG_PATH = "log/"
LOGGING = {
'version': 1,