-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b532838
commit dfb1479
Showing
5 changed files
with
33 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,18 @@ | ||
#!/bin/bash | ||
useradd -u 12001 compiler | ||
useradd -u 12002 code | ||
useradd -u 12003 spj | ||
usermod -a -G code spj | ||
|
||
rm -rf /judger/* | ||
mkdir -p /judger/run /judger/spj | ||
chown -R compiler:compiler /judger/ | ||
chmod -R 771 /judger/ | ||
|
||
chown compiler:code /judger/run | ||
chmod 711 /judger/run | ||
|
||
chown compiler:spj /judger/spj | ||
chmod 710 /judger/spj | ||
|
||
core=$(grep --count ^processor /proc/cpuinfo) | ||
n=$(($core*2)) | ||
exec gunicorn --workers $n --threads $n --error-logfile /log/gunicorn.log --time 600 --bind 0.0.0.0:8080 server:app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters