From 0b9155a5ad0f594ec5b26e25b6499b0fb3bb4eeb Mon Sep 17 00:00:00 2001 From: DevCam Date: Fri, 23 Jul 2021 19:57:14 -0500 Subject: [PATCH] restore SSL cert --- .travis.yml | 2 -- deploy/entrypoint.sh | 11 +++++------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index ac84fa0a..4ee38c5c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,5 +12,3 @@ script: - flake8 . - coverage run --include="$PWD/*" manage.py test - coverage report -notifications: - slack: onlinejudgeteam:BzBz8UFgmS5crpiblof17K2W diff --git a/deploy/entrypoint.sh b/deploy/entrypoint.sh index 682601aa..627c75a5 100755 --- a/deploy/entrypoint.sh +++ b/deploy/entrypoint.sh @@ -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