Skip to content

Commit

Permalink
Add how to build dolos-cli docker image to api/README
Browse files Browse the repository at this point in the history
  • Loading branch information
rien committed Oct 24, 2024
1 parent 134d338 commit a44acd7
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,27 @@ You can start the server with `rails server`. This will start the API server on
To be able to analyze datasets, you need to have the latest image of the Dolos docker

```bash
docker pull ghcr.io/dodona-ede/dolos:latest
docker pull ghcr.io/dodona-edu/dolos-cli:latest
```

You can start the job worker with `rails jobs:work`.
This will start the job worker and will spawn docker containers to analyze datasets once they are uploaded.

#### Testing changes to the Dolos CLI in the API

If you want to test and develop with local changes to the Dolos lib or CLI that haven't been published yet, you can use `nix` to create a docker image for you:

```shell
nix build .?submodules=1#dolos-load-docker
./result/bin/dolos-load-docker
# Loaded image: ghcr.io/dodona-edu/dolos-cli:latest
```

Explanation: `nix build` will first build the `dolos-cli` package using the current state of the repository (including submodules), then wrap the CLI in a docker image, and then build the script loading that image in your current docker instance with the correct name.

If `nix` complains about an incorect `npmDepsHash`, you can replace the expected hash in `../package.nix`.


### 4. Running the frontend

To interact with the API server you should run the `dolos-web` front-end in _server mode_.
Expand Down

0 comments on commit a44acd7

Please sign in to comment.