mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-09 23:08:42 +00:00
chore: add uoj_protocol config
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
3de083701d
commit
e77fe16199
@ -51,6 +51,7 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
environment:
|
environment:
|
||||||
|
- UOJ_PROTOCOL=http
|
||||||
- DATABASE_HOST=uoj-db
|
- DATABASE_HOST=uoj-db
|
||||||
- DATABASE_PASSWORD=root
|
- DATABASE_PASSWORD=root
|
||||||
- JUDGER_SOCKET_PORT=2333
|
- JUDGER_SOCKET_PORT=2333
|
||||||
|
@ -46,6 +46,7 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
environment:
|
environment:
|
||||||
|
- UOJ_PROTOCOL=https
|
||||||
- DATABASE_HOST=uoj-db
|
- DATABASE_HOST=uoj-db
|
||||||
- DATABASE_PASSWORD=root
|
- DATABASE_PASSWORD=root
|
||||||
- JUDGER_SOCKET_PORT=2333
|
- JUDGER_SOCKET_PORT=2333
|
||||||
|
@ -11,6 +11,7 @@ _salt0_="${SALT0:-$(genRandStr 32)}"
|
|||||||
_salt1_="${SALT1:-$(genRandStr 16)}"
|
_salt1_="${SALT1:-$(genRandStr 16)}"
|
||||||
_salt2_="${SALT2:-$(genRandStr 16)}"
|
_salt2_="${SALT2:-$(genRandStr 16)}"
|
||||||
_salt3_="${SALT3:-$(genRandStr 16)}"
|
_salt3_="${SALT3:-$(genRandStr 16)}"
|
||||||
|
_uoj_protocol_="${UOJ_PROTOCOL:-http}"
|
||||||
|
|
||||||
getAptPackage(){
|
getAptPackage(){
|
||||||
printf "\n\n==> Getting environment packages\n"
|
printf "\n\n==> Getting environment packages\n"
|
||||||
@ -86,6 +87,7 @@ initProgress(){
|
|||||||
chown -R www-data:www-data /var/uoj_data
|
chown -R www-data:www-data /var/uoj_data
|
||||||
#Replace password placeholders
|
#Replace password placeholders
|
||||||
sed -i -e "s/salt0/$_salt0_/g" -e "s/salt1/$_salt1_/g" -e "s/salt2/$_salt2_/g" -e "s/salt3/$_salt3_/g" -e "s/_judger_socket_password_/$_judger_socket_password_/g" /var/www/uoj/app/.config.php
|
sed -i -e "s/salt0/$_salt0_/g" -e "s/salt1/$_salt1_/g" -e "s/salt2/$_salt2_/g" -e "s/salt3/$_salt3_/g" -e "s/_judger_socket_password_/$_judger_socket_password_/g" /var/www/uoj/app/.config.php
|
||||||
|
sed -i -e "s/'protocol' => 'http'/'protocol' => '$_uoj_protocol_',/g" /var/www/uoj/app/.config.php
|
||||||
#Using cli upgrade to latest
|
#Using cli upgrade to latest
|
||||||
php /var/www/uoj/app/cli.php upgrade:latest
|
php /var/www/uoj/app/cli.php upgrade:latest
|
||||||
#Start services
|
#Start services
|
||||||
|
Loading…
Reference in New Issue
Block a user