You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ebb35db
Browse filesBrowse the repository at this point in the historyBrowse files
* Docs: explain how to keep changes out of the clone
Add an optional README section for running a stack from a copy of its service directory, or from a compose.override.yaml, so git pull no longer collides with local changes. Refs #317.
* Docs: compare .env too when running a stack from a copy
---------
Co-authored-by: Bart <57799908+crypt0rr@users.noreply.github.com>
Copy file name to clipboardExpand all lines: README.md
+42Lines changed: 42 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,7 @@ ScaleTail is a collection of ready-to-run [Docker Compose](https://docs.docker.c
22
22
-[Utilities](#utilities)
23
23
-[Food and wellness](#food-and-wellness)
24
24
-[Update a stack](#update-a-stack)
25
+
-[Keep your changes out of the clone](#keep-your-changes-out-of-the-clone)
25
26
-[Remove a stack](#remove-a-stack)
26
27
-[Get help](#get-help)
27
28
-[Tailscale Serve and Funnel](#tailscale-serve-and-funnel)
@@ -286,6 +287,47 @@ If `git stash pop` reports a conflict in `.env`, open the file, keep your values
286
287
287
288
Before you restart the stack, read the "Upgrading" section of the service README, if it has one.
288
289
290
+
## Keep your changes out of the clone
291
+
292
+
This section is optional. The steps in [Quick Start](#quick-start) work as they are. Use one of these options when you run several stacks, or when `git pull` or switching branches runs into your `.env` or into data that the containers wrote as root.
293
+
294
+
### Run the stack from a copy
295
+
296
+
Copy the service directory out of the clone, before the first start, and run the stack from the copy:
Your `.env`, the Tailscale state, and the application data now live outside the clone, so `git pull` in the clone never conflicts with them. A copy no longer follows the repository, so to pick up changes, update the clone and compare the files:
The `.env` comparison also lists the values you set yourself. Look for variables that are new upstream, such as a new required secret, and add them to your copy.
312
+
313
+
Read the "Upgrading" section of the service README before you apply a change.
314
+
315
+
### Keep your changes in an override file
316
+
317
+
To stay in the clone, put your changes to `compose.yaml` in a file named `compose.override.yaml` (singular) next to it. Compose reads both files without extra options, and `git pull` never touches an untracked file. Entries in `volumes` and `environment` replace the entry with the same container path or variable name, so an override can also move data out of the clone:
Use the container path from the `volumes` of the application in `compose.yaml`. Check the result with `docker compose config`. The override file does not cover `.env`, which is tracked, so keep using `git stash` for it, or run the stack from a copy.
330
+
289
331
## Remove a stack
290
332
291
333
From the service directory, run `docker compose down --volumes`. To remove the stack completely, also remove the device on the [Machines](https://console.tailscale.com/admin/machines) page and delete the service directory. It contains the Tailscale state in `./ts/state` and the application data. The containers create some of these folders as root, so deleting them may need `sudo`.
0 commit comments