mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-08 16:08:41 +00:00
fix: storage
This commit is contained in:
parent
af58465477
commit
df203c3375
@ -48,6 +48,6 @@ services:
|
|||||||
- uoj-judger
|
- uoj-judger
|
||||||
volumes:
|
volumes:
|
||||||
- ./uoj_data/web/data:/var/uoj_data
|
- ./uoj_data/web/data:/var/uoj_data
|
||||||
- ./uoj_data/web/storage_submission:/opt/uoj/web/app/storage/submission
|
- ./uoj_data/web/storage:/opt/uoj/web/app/storage
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
|
@ -27,7 +27,7 @@ function uojRandAvaiableTmpFileName() {
|
|||||||
function uojRandAvaiableSubmissionFileName() {
|
function uojRandAvaiableSubmissionFileName() {
|
||||||
$num = uojRand(1, 10000);
|
$num = uojRand(1, 10000);
|
||||||
if (!file_exists(UOJContext::storagePath()."/submission/$num")) {
|
if (!file_exists(UOJContext::storagePath()."/submission/$num")) {
|
||||||
system("mkdir ".UOJContext::storagePath()."/submission/$num");
|
mkdir(UOJContext::storagePath()."/submission/$num", 0777, true);
|
||||||
}
|
}
|
||||||
return uojRandAvaiableFileName("/submission/$num/");
|
return uojRandAvaiableFileName("/submission/$num/");
|
||||||
}
|
}
|
||||||
|
@ -48,6 +48,7 @@ UOJEOF
|
|||||||
#Create UOJ session save dir and make PHP extensions available
|
#Create UOJ session save dir and make PHP extensions available
|
||||||
mkdir --mode=733 /var/lib/php/uoj_sessions && chmod +t /var/lib/php/uoj_sessions
|
mkdir --mode=733 /var/lib/php/uoj_sessions && chmod +t /var/lib/php/uoj_sessions
|
||||||
sed -i -e '912a\extension=v8js.so\nextension=yaml.so' /etc/php/7.4/apache2/php.ini
|
sed -i -e '912a\extension=v8js.so\nextension=yaml.so' /etc/php/7.4/apache2/php.ini
|
||||||
|
sed -i 's|;sys_temp_dir = "/tmp"|sys_temp_dir = "/tmp"|g' /etc/php/7.4/apache2/php.ini
|
||||||
}
|
}
|
||||||
|
|
||||||
setWebConf(){
|
setWebConf(){
|
||||||
@ -88,6 +89,9 @@ initProgress(){
|
|||||||
service apache2 restart
|
service apache2 restart
|
||||||
#Touch SetupDone flag file
|
#Touch SetupDone flag file
|
||||||
touch /var/uoj_data/.UOJSetupDone
|
touch /var/uoj_data/.UOJSetupDone
|
||||||
|
mkdir -p /opt/uoj/web/app/storage/submission
|
||||||
|
mkdir -p /opt/uoj/web/app/storage/tmp
|
||||||
|
chmod -R 777 /opt/uoj/web/app/storage
|
||||||
printf "\n\n***Installation complete. Enjoy!***\n"
|
printf "\n\n***Installation complete. Enjoy!***\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user