restore SSL cert

This commit is contained in:
DevCam 2021-07-23 19:57:14 -05:00
parent ddc07e0847
commit 0b9155a5ad
2 changed files with 5 additions and 8 deletions

View File

@ -12,5 +12,3 @@ script:
- flake8 .
- coverage run --include="$PWD/*" manage.py test
- coverage report
notifications:
slack: onlinejudgeteam:BzBz8UFgmS5crpiblof17K2W

View File

@ -17,12 +17,11 @@ if [ ! -f "$DATA/public/website/favicon.ico" ]; then
cp data/public/website/favicon.ico $DATA/public/website
fi
# disable SSL since it will be handled by the top level nginx server
# SSL="$DATA/ssl"
# if [ ! -f "$SSL/server.key" ]; then
# openssl req -x509 -newkey rsa:2048 -keyout "$SSL/server.key" -out "$SSL/server.crt" -days 1000 \
# -subj "/C=CN/ST=Beijing/L=Beijing/O=Beijing OnlineJudge Technology Co., Ltd./OU=Service Infrastructure Department/CN=`hostname`" -nodes
# fi
SSL="$DATA/ssl"
if [ ! -f "$SSL/server.key" ]; then
openssl req -x509 -newkey rsa:2048 -keyout "$SSL/server.key" -out "$SSL/server.crt" -days 1000 \
-subj "/C=CN/ST=Beijing/L=Beijing/O=Beijing OnlineJudge Technology Co., Ltd./OU=Service Infrastructure Department/CN=`hostname`" -nodes
fi
cd $APP/deploy/nginx
ln -sf locations.conf https_locations.conf