From 8f9ce62d66eb8a21c7cf6b58a4cecb939811cef6 Mon Sep 17 00:00:00 2001 From: Souvlaki42 Date: Mon, 25 Aug 2025 16:55:20 +0000 Subject: [PATCH 1/3] fix: fixed root access permissions in the Dockerfile --- compiler/base/Dockerfile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/compiler/base/Dockerfile b/compiler/base/Dockerfile index cfbdaa05..cb905f47 100644 --- a/compiler/base/Dockerfile +++ b/compiler/base/Dockerfile @@ -79,6 +79,10 @@ WORKDIR /orchestrator FROM chef-available as prepare-orchestrator +USER root +RUN chown playground:playground /orchestrator +USER playground + COPY --chown=playground asm-cleanup /asm-cleanup COPY --chown=playground modify-cargo-toml /modify-cargo-toml COPY --chown=playground orchestrator /orchestrator @@ -88,9 +92,16 @@ RUN cargo chef prepare FROM chef-available as build-orchestrator +USER root +RUN chown playground:playground /orchestrator +USER playground + COPY --chown=playground asm-cleanup /asm-cleanup COPY --chown=playground modify-cargo-toml /modify-cargo-toml COPY --chown=playground --from=prepare-orchestrator /orchestrator/recipe.json /orchestrator/recipe.json + +COPY --chown=playground orchestrator/Cargo.toml /orchestrator/Cargo.toml + RUN cargo chef cook --locked --release COPY --chown=playground orchestrator /orchestrator From 01f2ac9b8c5f349634533ea7a48972ad70a170c9 Mon Sep 17 00:00:00 2001 From: Souvlaki42 Date: Wed, 3 Sep 2025 21:03:44 +0300 Subject: [PATCH 2/3] feat: improved instructions --- README.md | 40 +++++++++++++++++++++++----------------- ui/README.md | 2 ++ 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 62a2cb58..639d0102 100644 --- a/README.md +++ b/README.md @@ -84,35 +84,41 @@ perform tests on! Once fixed, you can choose to be credited here. ## Development ### Build the UI -``` +```bash cd ui/frontend pnpm install pnpm watch # Will rebuild and watch for changes ``` -If you don't need the backend running because you are only making -basic HTML/CSS/JS changes, directly open in your browser the built -`ui/frontend/build/index.html`. - -### Build and run the server - -``` -cd ui -cargo run -``` - -There are some optional configuration parameters described in the -[ui README](./ui/README.md) which you may set in a `.env` file. The server will -run with no configuration, but in order to load and save gists a GitHub token -must be configured. +> [!TIP] +> If you don't need the backend running because you are only making +> basic HTML/CSS/JS changes, directly open in your browser the built +> `ui/frontend/build/index.html`. ### Build or download the containers -``` +```bash cd compiler ./build.sh # If you want to test changes to the containers ./fetch.sh # If you just want the current playground ``` +### Build and run the server + +```bash +cd ui +cargo run +``` +> [!TIP] +> There are some optional configuration parameters described in the +> [ui README](./ui/README.md) which you may set in a `.env` file. The server will +> run with no configuration, but in order to load and save gists a GitHub token +> must be configured. + +> [!IMPORTANT] +> When running the server, you may see some docker warnings about missing containers. You can safely ignore them. +> You shouldn't see any docker containers running most of the time. This is normal. +> You don't need to spawn or kill any containers yourself. The backend manages that itself. + ## Deployment * [Amazon EC2 (Ubuntu)](deployment/ubuntu.md) diff --git a/ui/README.md b/ui/README.md index 98708199..988f6d97 100644 --- a/ui/README.md +++ b/ui/README.md @@ -21,6 +21,8 @@ of choice. ### Troubleshooting +If you can't get the UI to show up outside of your network, you may need to set the `PLAYGROUND_UI_ADDRESS` environment variable to `0.0.0.0`. + #### macOS After launching `ui`, when you try to do any action (ex. `build`, `rustfmt`, `run` and so on), you get errors from Docker about "Mounts denied": From 1fb03bdbbd57e9474beb03d0532fbf7a79846507 Mon Sep 17 00:00:00 2001 From: Souvlaki42 Date: Wed, 10 Sep 2025 18:32:44 +0300 Subject: [PATCH 3/3] revert: reverted dockerfile changes --- compiler/base/Dockerfile | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/compiler/base/Dockerfile b/compiler/base/Dockerfile index cb905f47..cfbdaa05 100644 --- a/compiler/base/Dockerfile +++ b/compiler/base/Dockerfile @@ -79,10 +79,6 @@ WORKDIR /orchestrator FROM chef-available as prepare-orchestrator -USER root -RUN chown playground:playground /orchestrator -USER playground - COPY --chown=playground asm-cleanup /asm-cleanup COPY --chown=playground modify-cargo-toml /modify-cargo-toml COPY --chown=playground orchestrator /orchestrator @@ -92,16 +88,9 @@ RUN cargo chef prepare FROM chef-available as build-orchestrator -USER root -RUN chown playground:playground /orchestrator -USER playground - COPY --chown=playground asm-cleanup /asm-cleanup COPY --chown=playground modify-cargo-toml /modify-cargo-toml COPY --chown=playground --from=prepare-orchestrator /orchestrator/recipe.json /orchestrator/recipe.json - -COPY --chown=playground orchestrator/Cargo.toml /orchestrator/Cargo.toml - RUN cargo chef cook --locked --release COPY --chown=playground orchestrator /orchestrator