mirror of
https://github.com/QingdaoU/OpenVJ.git
synced 2024-12-28 15:31:48 +00:00
修改部分设置
This commit is contained in:
parent
9352f8648a
commit
2da8d3de72
@ -1,12 +1,12 @@
|
||||
redis:
|
||||
image: redis
|
||||
# volumes:
|
||||
# - /home/data/redis:/data
|
||||
volumes:
|
||||
- /home/data/vj_redis:/data
|
||||
|
||||
mysql:
|
||||
image: mysql
|
||||
# volumes:
|
||||
# - /home/data/mysql:/var/lib/mysql
|
||||
volumes:
|
||||
- /home/data/vj_mysql:/var/lib/mysql
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD={YOUR_PASSWORD}
|
||||
|
||||
@ -17,8 +17,8 @@ openvj_server:
|
||||
links:
|
||||
- redis:redis
|
||||
- mysq;:mysql
|
||||
ports:
|
||||
- "127.0.0.1:8090:8080"
|
||||
environment:
|
||||
- vj_env=server
|
||||
- MYSQL_ENV_MYSQL_USER=root
|
||||
ports:
|
||||
- "127.0.0.1:8090:8080"
|
||||
environment:
|
||||
- vj_env=server
|
||||
- MYSQL_ENV_MYSQL_USER=root
|
@ -1,4 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ ! -f "/code/openoj/custom_settings.py" ]; then
|
||||
cp /code/openvj/custom_settings.example.py /code/openvj/custom_settings.py
|
||||
echo "SECRET_KEY=\"`cat /dev/urandom | head -1 | md5sum | head -c 32`\"" >> /code/openvj/custom_settings.py
|
||||
fi
|
||||
find /code -name "*.pyc" -delete
|
||||
python -m compileall /code
|
||||
gunicorn openvj.wsgi:application -b 0.0.0.0:8080 --user nobody --group nogroup --reload &
|
||||
wait
|
@ -1 +1,2 @@
|
||||
SECRET_KEY = ""
|
||||
# please set your own SECRET_KEY to a long random string
|
||||
# SECRET_KEY = ""
|
@ -9,6 +9,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
|
||||
ALLOWED_HOSTS = ['*']
|
||||
|
||||
# Database
|
||||
# https://docs.djangoproject.com/en/1.9/ref/settings/#databases
|
||||
|
@ -7,17 +7,31 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
DEBUG = False
|
||||
|
||||
ALLOWED_HOSTS = ['*']
|
||||
|
||||
# Database
|
||||
# https://docs.djangoproject.com/en/1.9/ref/settings/#databases
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
|
||||
'ENGINE': 'django.db.backends.mysql',
|
||||
'NAME': "oj",
|
||||
'CONN_MAX_AGE': 0.1,
|
||||
'HOST': os.environ["MYSQL_PORT_3306_TCP_ADDR"],
|
||||
'PORT': 3306,
|
||||
'USER': os.environ["MYSQL_ENV_MYSQL_USER"],
|
||||
'PASSWORD': os.environ["MYSQL_ENV_MYSQL_ROOT_PASSWORD"]
|
||||
}
|
||||
}
|
||||
|
||||
BROKER_URL = 'amqp://guest:guest@localhost//'
|
||||
REDIS_QUEUE = {
|
||||
"host": os.environ["REDIS_PORT_6379_TCP_ADDR"],
|
||||
"port": 6379,
|
||||
"db": 3
|
||||
}
|
||||
|
||||
# celery配置
|
||||
BROKER_URL = 'redis://%s:%s/%s' % (REDIS_QUEUE["host"], str(REDIS_QUEUE["port"]), str(REDIS_QUEUE["db"]))
|
||||
CELERY_RESULT_BACKEND = "redis"
|
||||
|
@ -30,10 +30,6 @@ 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/1.9/howto/deployment/checklist/
|
||||
|
||||
|
||||
ALLOWED_HOSTS = []
|
||||
|
||||
|
||||
# Application definition
|
||||
|
||||
INSTALLED_APPS = [
|
||||
|
Loading…
Reference in New Issue
Block a user