mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2025-11-04 14:49:58 +08:00
gen ssl crt
This commit is contained in:
parent
fc635a3696
commit
a7cb769a24
1
.dockerignore
Normal file
1
.dockerignore
Normal file
@ -0,0 +1 @@
|
|||||||
|
.git*
|
||||||
@ -1,7 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
if [ ! -f "/code/oj/custom_settings.py" ]; then
|
if [ ! -f "/code/oj/secret_key.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/secret_key.py
|
||||||
echo "SECRET_KEY=\"`cat /dev/urandom | head -1 | md5sum | head -c 32`\"" >> /code/oj/custom_settings.py
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ca_base_dir="/code/ssl"
|
ca_base_dir="/code/ssl"
|
||||||
|
|||||||
1
oj/secret_key.example.py
Normal file
1
oj/secret_key.example.py
Normal file
@ -0,0 +1 @@
|
|||||||
|
SECRET_KEY="123456"
|
||||||
@ -23,6 +23,7 @@ elif ENV == "server":
|
|||||||
from .server_settings import *
|
from .server_settings import *
|
||||||
|
|
||||||
from .custom_settings import *
|
from .custom_settings import *
|
||||||
|
from .secret_key import *
|
||||||
|
|
||||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user