First steps¶
Ralph LRS is distributed as a Docker image on DockerHub, following the format:
fundocker/ralph:<release version | latest>
.
Let’s dive straight in and create a docker-compose.yml
file:
version: "3.9"
services:
lrs:
image: fundocker/ralph:latest
environment:
RALPH_APP_DIR: /app/.ralph
RALPH_RUNSERVER_BACKEND: fs
ports:
- "8100:8100"
command:
- "uvicorn"
- "ralph.api:app"
- "--proxy-headers"
- "--workers"
- "1"
- "--host"
- "0.0.0.0"
- "--port"
- "8100"
volumes:
- .ralph:/app/.ralph
For now, we are using the fs
(File System) backend, meaning that Ralph LRS will store learning records in local files.
First, we need to manually create the .ralph
directory alongside the docker-compose.yml
file with the command:
We can then run Ralph LRS from a terminal with the command:
Ralph LRS server should be up and running!
We can request the whoami
endpoint to check if the user is authenticated. On success, the endpoint returns the username and permission scopes.
If you’ve made it this far, congrats! 🎉
You’ve successfully deployed the Ralph LRS and got a response to your request!
Let’s shutdown the Ralph LRS server with the command docker compose down
and set up authentication.