Skip to content

in-silico/utpjudge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

utpjudge

WARNING: Work in progress.

Online judge for programming contest

Clone

git clone --recursive git@github.com:in-silico/utpjudge.git

Set-up judge behind reverse proxy

  • Install nginx

      aptitude update
      aptitude install nginx
    
  • Add basic dns configuration at '/etc/hosts'

      127.0.1.1	judge.is
      127.0.1.1	api.judge.is
    
  • Add basic configuration for nginx at '/etc/nginx/sites-available/default'

server {
  listen 80;

  server_name judge.is;

  location / {
    proxy_pass http://localhost:8081;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_set_header Host $host;
    proxy_cache_bypass $http_upgrade;
  }
}


server {
  listen 80;

  server_name api.judge.is;

  location / {
    proxy_pass http://localhost:8080;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_set_header Host $host;
    proxy_cache_bypass $http_upgrade;
  }
}

Nginx Error - 413 Request Entity Too Large

You (probably) will receive that error when try to update large files.

In order to fix that problem, you need to add the following in the http section:

client_max_body_size 50M;

in the '/etc/nginx/nginx.conf' file

NOTE: Remember to update the nginx server using nginx -s reload as root.

Get API keys from github

In order to authenticate users with github you'll need to get your own keys from github.com

Register you app here https://github.com/settings/applications/new and then copy your private/public key into the config/oauth file In both the judge backend and the judge frontend.

NOTE: I strongly recommend you to use the following command to avoid sharing your keys:

    git update-index --assume-unchanged config/oauth.js

Developed by In-silico.

About

Online judge for programming contest

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published