gen ssl crt

This commit is contained in:
virusdefender 2017-06-14 17:31:00 +08:00
parent fc635a3696
commit a7cb769a24
4 changed files with 5 additions and 3 deletions

1
.dockerignore Normal file
View File

@ -0,0 +1 @@
.git*

View File

@ -1,7 +1,6 @@
#!/usr/bin/env bash
if [ ! -f "/code/oj/custom_settings.py" ]; then
cp /code/oj/custom_settings.example.py /code/oj/custom_settings.py
echo "SECRET_KEY=\"`cat /dev/urandom | head -1 | md5sum | head -c 32`\"" >> /code/oj/custom_settings.py
if [ ! -f "/code/oj/secret_key.py" ]; then
echo "SECRET_KEY=\"`cat /dev/urandom | head -1 | md5sum | head -c 32`\"" >> /code/oj/secret_key.py
fi
ca_base_dir="/code/ssl"

1
oj/secret_key.example.py Normal file
View File

@ -0,0 +1 @@
SECRET_KEY="123456"

View File

@ -23,6 +23,7 @@ elif ENV == "server":
from .server_settings import *
from .custom_settings import *
from .secret_key import *
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))