@@ -163,6 +163,32 @@ The `devcontainer` depends on the following service containers defined in
163163All service containers mount the workspace at ` /workspace` so that file changes
164164are shared.
165165
166+ # # Automatic Service Bootstrap
167+
168+ > You can skip this section if you do not want to automatically
169+ > [install dependencies](# installing-dependencies), [build](#building), and
170+ > [run](# running) the application, or if you are not an experienced developer.
171+
172+ Setting ` COMPOSE_AUTOSTART=true` in ` .env` makes the ` node` and ` docs`
173+ service containers automatically install dependencies, build, and run the
174+ application when they start. The default is ` false` .
175+
176+ Setting ` COMPOSE_AUTOSTART=true` comes with the following trade-offs:
177+
178+ * ** Changes to dependencies require a container restart.** The watcher owns the
179+ service container' s entrypoint, so updating dependencies (e.g. pulling a
180+ branch that changes `package-lock.json`, or running `npm install <pkg>`)
181+ only takes effect after restarting the `node` service container. The same
182+ applies to changes that affect the documentation server.
183+ * **Service logs are not directly visible.** The watcher and docs server run in
184+ their own service containers rather than in your `devcontainer` shell, so
185+ their output is not shown alongside your regular terminal work. You have to
186+ inspect it via `docker compose logs <service>` from the host.
187+
188+ > If something is not working as expected, or you are not sure what is going on,
189+ > set `COMPOSE_AUTOSTART=false`, restart the containers, and follow the
190+ > manual steps in the sections below instead.
191+
166192## Installing Dependencies
167193
168194Run it on initial setup or when dependencies have changed:
@@ -187,9 +213,6 @@ mkdocs build
187213
188214## Running
189215
190- > See ` .env` whether both the application and documentation server are not configured
191- > to auto-start on container startup. If they are, you can skip the following steps.
192-
193216To start building JavaScript files in watch mode:
194217
195218```bash
0 commit comments