Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
surajkumar committed May 19, 2024
1 parent 6d89300 commit 2c1a752
Showing 1 changed file with 6 additions and 31 deletions.
37 changes: 6 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# JShellPlaygroundBackend
## Prerequisites
- Java 19
- Java 21
- Docker

# Structure of the project
Expand Down Expand Up @@ -29,35 +29,10 @@ JShellAPI is a REST API, and whenever some code is received, it will create a se
# How to build JShellAPI in and run it in Docker
- Launch Docker
- Run `jibDockerBuild` to create the image
- Create a folder
- Create `docker-compose.yml`:
```yml
services:
jshell-backend-master:
image: "togetherjava.org:5001/togetherjava/jshellbackend:master"
command: ["--spring.config.location=file:///home/backend/config/application.properties"]
restart: always
ports:
- 54321:8080
- 5005:5005
environment:
JAVA_TOOL_OPTIONS: "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./docker-config.json:/root/.docker/config.json
- ./config:/home/backend/config
networks:
- jshell-backend

networks:
jshell-backend:
external: true
name: develop-bot
```
- Optionaly, create `config/application.properties` where you can put custom config (see the actual [application.properties](JShellAPI/src/main/resources/application.properties))
- If you don't create it, delete the `command: ["--spring.config.location=file:///home/backend/config/application.properties"]` line in the `docker-compose.yml`
- Run `docker compose build` or `docker-compose build` in the folder, depending of your version of Docker.
- Run `docker compose start` or `docker-compose start` in the folder, depending of your version of Docker.
- Optionally, create `config/application.yaml` where you can put custom config (see the actual [application.yaml](JShellAPI/src/main/resources/application.yaml))
- If you don't create it, delete the `command: ["--spring.config.location=file:///home/backend/config/application.yaml"]` line in the `docker-compose.yaml`
- Run `docker compose build` or `docker-compose build` in the folder, depending on your version of Docker.
- Run `docker compose start` or `docker-compose start` in the folder, depending on your version of Docker.

## How to use JShellApi ?
See [GUIDE.MD](JShellAPI/README.MD)
See [JShellAPI README](JShellAPI/README.MD)

0 comments on commit 2c1a752

Please sign in to comment.