-
Notifications
You must be signed in to change notification settings - Fork 25
Dev's Guide: Running from source
This page explains how to run Judgels locally from source.
-
Go to
judgels-backends/judgels-server-app
. -
Copy the example config file:
cp var/conf/judgels-server.yml.example var/conf/judgels-server.yml
-
Create a new local MySQL database called
judgels
. -
Open the config file
var/conf/judgels-server.yml
. -
Under
database:
, modifyuser
andpassword
as necessary so that we can connect to thejudgels
database. -
Run database migration:
../gradlew dbMigrate
-
Verify that there are new tables generated in the database.
-
Finally, run the server app:
../gradlew run
-
Verify that we can open the server admin app at
http://localhost:9101
. -
Verify that we can log in as the default superadmin user (username:
superadmin
, password:superadmin
).
-
Import the sample SQL data from
seeds/judgels.sql
to thejudgels
database. -
Still in
judgels-backends/judgels-server-app
, untar the*.tar.gz
files fromseeds/
tovar/data
:tar -xf ../../seeds/problems.tar.gz -C var/data/ tar -xf ../../seeds/lessons.tar.gz -C var/data/ tar -xf ../../seeds/submissions.tar.gz -C var/data/
The seed data contains:
- 6 users with the following usernames:
andi
,budi
,caca
,dudi
,emir
,fuad
. Passwords are equal to the usernames. - Sample problems, lessons, and submissions data.
-
Go to
judgels-client/raphael
. -
Copy the example config:
cp public/var/conf/raphael-v9.js.example public/var/conf/raphael-v9.js
-
(Optional) If you are developing for TLX, open the config file (
public/var/conf/raphael-v9.js
) and changewindow.conf.mode
toTLX
. -
Install client app dependencies:
yarn install
-
Finally, run the client app:
yarn start
-
Verify that we can open the client app at
http://localhost:3000
.
Congratulations, you have successfully run Judgels from source!
-
Error: EMFILE: too many open files, watch
on macOS when runningyarn test
-
To fix this, run:
brew install watchman
See https://github.com/facebook/create-react-app/issues/4540 for more details.
-
-
error: method transform in class Lists cannot be applied to given types
when running./gradlew check
- This is compilation error when using Java version
1.8.0_25
, not sure which exact minimum version that compiles successfully but Java version1.8.0_201
works.
- This is compilation error when using Java version