From da007ccc13972b27765503c0aa5347aff72d87c0 Mon Sep 17 00:00:00 2001 From: Anton Date: Fri, 1 Dec 2023 00:59:33 +0500 Subject: [PATCH] doc: install 0.5.0 --- README.md | 2 +- docs/install.md | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 41ba88f..fec1e87 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ content-type: application/json } ``` -`sandbox` is the name of the pre-configured sandbox, and `command` is the name of a command supported by that sandbox. See [Configuration](docs/config.md) for details. +`sandbox` is the name of the pre-configured sandbox, and `command` is the name of a command supported by that sandbox. See [Adding a sandbox](docs/add-sandbox.md) for details on how to add a new sandbox. `files` is a map, where the key is a filename and the value is its contents. When executing a single file, it should either be named as the `command` expects, or be an empty string (as in the example above). diff --git a/docs/install.md b/docs/install.md index 0cbb380..b8c6b85 100644 --- a/docs/install.md +++ b/docs/install.md @@ -26,24 +26,24 @@ docker run hello-world ```sh cd /opt/codapi -curl -L -o codapi.zip "https://api.github.com/repos/nalgeon/codapi/actions/artifacts/926428361/zip" -unzip -u codapi.zip -chmod +x build/codapi -rm -f codapi.zip +curl -L -O "https://github.com/nalgeon/codapi/releases/download/0.5.0/codapi_0.5.0_linux_amd64.tar.gz" +tar xvzf codapi_0.5.0_linux_amd64.tar.gz +chmod +x codapi +rm -f codapi_0.5.0_linux_amd64.tar.gz ``` -6. Build Docker images (as codapi): +5. Build Docker images (as codapi): ```sh cd /opt/codapi -make images +docker build --file images/alpine/Dockerfile --tag codapi/alpine:latest images/alpine/ ``` -7. Verify that Codapi starts without errors (as codapi): +6. Verify that Codapi starts without errors (as codapi): ```sh cd /opt/codapi -./build/codapi +./codapi ``` Should print the `alpine` box and the `sh` command: @@ -58,7 +58,7 @@ Should print the `alpine` box and the `sh` command: Stop it with Ctrl+C. -8. Configure Codapi as systemd service (as root): +7. Configure Codapi as systemd service (as root): ```sh mv /opt/codapi/codapi.service /etc/systemd/system/ @@ -82,7 +82,7 @@ codapi.service - Code playgrounds ... ``` -9. Verify that Codapi is working: +8. Verify that Codapi is working: ```sh curl -H "content-type: application/json" -d '{ "sandbox": "sh", "command": "run", "files": {"": "echo hello" }}' http://localhost:1313/v1/exec