- Java 21
- Docker
There are two projects, JShellAPI and JShellWrapper JShellAPI is a REST API, and whenever some code is received, it will create a session, by creating a docker container, which will run JShellWrapper inside and then execute the given code in JShellWrapper.
- Go in Run → Run... → Edit Configurations → create a configuration
- Select the command
JShellWrapper:run
- Click on modify options, and check
VM options
- Then add
evalTimeoutSeconds=15;sysOutCharLimit=1024
in the VM options - Press the run button
- Launch Docker
- Run
./gradlew :JShellWrapper:jibDockerBuild
to build the image - Run
./gradlew bootRun
- Launch Docker
- Run
JShellWrapper:jibDockerBuild
to build the image - Run
bootRun
- Launch Docker
- Run
jibDockerBuild
to create the image - Create a folder outside the project
cd
to this folder- Copy
docker-compose.yaml
inside it - Optionally, create
config/application.yaml
where you can put custom config (see the actual application.yaml)
-
- If you don't create it, delete the
command: ["--spring.config.location=file:///home/backend/config/application.yaml"]
line in thedocker-compose.yaml
- If you don't create it, delete the
- Run
docker compose build
ordocker-compose build
in the folder, depending on your version of Docker. - Run
docker compose start
ordocker-compose start
in the folder, depending on your version of Docker. - Note that some folders or files may be created automatically inside this folder
- File tree representation:
-folder outside the project
-docker-compose.yaml
-config (optionnal)
-application.yaml
See JShellAPI README