From 7599eb2d4ce81695d06afce7f6ec759607c038b4 Mon Sep 17 00:00:00 2001 From: SandObserver <260779319+SandObserver@users.noreply.github.com> Date: Tue, 20 Oct 2026 19:45:57 -0400 Subject: [PATCH] Run the working tree with the dev Compose file --- src/content/docs/docs/contributing/index.md | 7 +++++-- src/content/docs/docs/create-a-widget/index.mdx | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/content/docs/docs/contributing/index.md b/src/content/docs/docs/contributing/index.md index 601c137..c23eda4 100644 --- a/src/content/docs/docs/contributing/index.md +++ b/src/content/docs/docs/contributing/index.md @@ -13,11 +13,14 @@ Open an issue first if a change needs a dependency or a build step. ## Run locally +Run the working tree with Docker Compose 2.23 or later: + ```sh -docker build -t stackyard:local . -docker run -d -p 8700:80 -v ./data:/data -v ./icons:/icons stackyard:local +docker compose -f docker-compose.dev.yml watch ``` +It serves `http://127.0.0.1:8701`. A saved file reaches the container within a few seconds. A change under `api/src` or `ui/widgets` restarts it. A change to the Dockerfile, nginx or supervisord config rebuilds the image. Data is kept in `.dev/`. + Without Docker, start the API with `npm start` in `api/`, setting `CONFIG_PATH`, `ICONS_PATH` and `WIDGETS_PATH=../ui/widgets`. Serve `ui/` with any server that proxies `/api/` and `/health` to `127.0.0.1:3000`, as `nginx/dashboard.conf` does. ## Tests diff --git a/src/content/docs/docs/create-a-widget/index.mdx b/src/content/docs/docs/create-a-widget/index.mdx index 5443f17..3fabe3c 100644 --- a/src/content/docs/docs/create-a-widget/index.mdx +++ b/src/content/docs/docs/create-a-widget/index.mdx @@ -84,6 +84,6 @@ The return value is served at `/api/widget-data/`. Report every failure thro ## 5. Try it -Restart Stackyard, then in Settings, **Dashboard**, press Add and pick **My Widget**. If it is missing, the container log says why. +Start the [dev instance](/docs/contributing/#run-locally) if it is not running. A new folder in `ui/widgets/` restarts it. Then in Settings, **Dashboard**, press Add and pick **My Widget**. If it is missing, the container log says why. Before a pull request, go through the [checklist](/docs/create-a-widget/checklist/).