Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ do not have to fix the rest of a stack that you touch.
`app-${SERVICE}-<role>` for extra containers, such as `app-${SERVICE}-db`.
- Pass `PUID` and `PGID` only when the image reads them, such as LinuxServer.io
images. Keep `TZ`, as the template does.
- Pass variables to a container under `environment`. Avoid `env_file: .env`:
it gives the container every variable in `.env`, including `TS_AUTHKEY`.
When a container must load `.env`, for example to follow the upstream
Compose file, add `TS_AUTHKEY=` to its `environment`, as for Immich, and
list the `env_file` under "Deviations from the standard setup".
- Write the image tag explicitly and use the tag upstream recommends. Pin
databases, caches, and search engines to a major or major.minor tag. When
you pin an exact version, say why in a comment.
Expand Down
2 changes: 1 addition & 1 deletion services/affine/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Set these values in `.env`:
- **Extra containers.** The stack runs `postgres`, `redis`, and `affine_migration`. The migration container prepares the database and then exits. All three use the default Compose network, and AFFiNE reaches them by their service name through Docker's DNS. Keep `TS_ACCEPT_DNS` disabled, because MagicDNS cannot resolve these names.
- **Image version.** `AFFINE_REVISION` in `.env` selects the version of the AFFiNE image.
- **Data folders.** The data is in `./affine-storage`, `./affine-config`, and `./postgres`, not in a `./affine-data` folder.
- **The containers read the whole `.env` file.** The `application` and `affine_migration` containers load `.env` through `env_file`. Every variable in that file, including `TS_AUTHKEY`, is therefore present in their environment.
- **The containers read the whole `.env` file.** The `application` and `affine_migration` containers load `.env` through `env_file`. Every variable in that file is therefore present in their environment, except `TS_AUTHKEY`. `compose.yaml` sets it to an empty value for them, because only the `tailscale` container uses the auth key.

## First run

Expand Down
2 changes: 2 additions & 0 deletions services/affine/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ services:
- .env
environment:
# Variables are declared in .env file.
- TS_AUTHKEY= # Empty: env_file loads all of .env, but only the tailscale container needs the auth key
- REDIS_SERVER_HOST=redis
- DATABASE_URL=postgresql://${DB_USERNAME}:${DB_PASSWORD:?Set DB_PASSWORD in .env}@postgres:5432/${DB_DATABASE:-affine}
- AFFINE_INDEXER_ENABLED=false
Expand All @@ -95,6 +96,7 @@ services:
- .env
environment:
# Variables are declared in .env file.
- TS_AUTHKEY= # Empty: env_file loads all of .env, but only the tailscale container needs the auth key
- REDIS_SERVER_HOST=redis
- DATABASE_URL=postgresql://${DB_USERNAME}:${DB_PASSWORD:?Set DB_PASSWORD in .env}@postgres:5432/${DB_DATABASE:-affine}
- AFFINE_INDEXER_ENABLED=false
Expand Down
2 changes: 1 addition & 1 deletion services/immich/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ This stack runs Immich with a Tailscale sidecar, as described in [the standard s
* **Extra containers.** Besides `application`, the stack runs `immich-machine-learning`, `redis` (Valkey), and `database` (Postgres). These three use the default Compose network and not the network of the `tailscale` container. Immich reaches them by their service name through Docker's DNS.
* **Images are set in `compose.yaml`.** The stack does not use `IMAGE_URL`. `IMMICH_VERSION` in `.env` selects the version of the server and machine learning images.
* **Keep `TS_ACCEPT_DNS` disabled.** The `application` service shares the DNS configuration of the `tailscale` service. With `TS_ACCEPT_DNS=true`, Tailscale replaces Docker's DNS with MagicDNS, which cannot resolve the `database`, `redis`, and `immich-machine-learning` services. Immich then fails to start with `getaddrinfo ENOTFOUND database`. You can reach Immich over your Tailnet without this setting.
* **The containers read the whole `.env` file.** As in the upstream Compose file, the Immich containers load `.env` through `env_file`. Every variable in that file, including `TS_AUTHKEY`, is therefore present in the environment of the `application` and `immich-machine-learning` containers.
* **The containers read the whole `.env` file.** As in the upstream Compose file, the Immich containers load `.env` through `env_file`. Every variable in that file is therefore present in the environment of the `application` and `immich-machine-learning` containers, except `TS_AUTHKEY`. `compose.yaml` sets it to an empty value for them, because only the `tailscale` container uses the auth key.

## First run

Expand Down
4 changes: 4 additions & 0 deletions services/immich/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ services:
- /etc/localtime:/etc/localtime:ro
env_file:
- .env
environment:
- TS_AUTHKEY= # Empty: env_file loads all of .env, but only the tailscale container needs the auth key
depends_on:
redis:
condition: service_healthy
Expand All @@ -85,6 +87,8 @@ services:
- ./${SERVICE}-data/model-cache:/cache
env_file:
- .env
environment:
- TS_AUTHKEY= # Empty: env_file loads all of .env, but only the tailscale container needs the auth key
# Healthcheck: defined by the image (python3 healthcheck.py), so this file does not override it.
restart: always

Expand Down
2 changes: 1 addition & 1 deletion services/kaneo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Set these values in `.env`:
- **Extra container.** The stack runs a `postgres` container. It uses the network of the `tailscale` container as well, so Kaneo reaches it at `localhost`. PostgreSQL listens only on the loopback address of the device, so other devices on your Tailnet cannot reach it.
- **Serve port from `.env`.** The Tailscale Serve configuration in `compose.yaml` takes its port from `SERVICEPORT`.
- **Database image.** `IMAGE_URL_DATABASE` in `.env` selects the PostgreSQL image.
- **The containers read the whole `.env` file.** Both containers load `.env` through `env_file`. Every variable in that file, including `TS_AUTHKEY`, is therefore present in their environment.
- **The containers read the whole `.env` file.** Both containers load `.env` through `env_file`. Every variable in that file is therefore present in their environment, except `TS_AUTHKEY`. `compose.yaml` sets it to an empty value for them, because only the `tailscale` container uses the auth key.

## First run

Expand Down
2 changes: 2 additions & 0 deletions services/kaneo/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ services:
env_file:
- .env
environment:
TS_AUTHKEY: "" # Empty: env_file loads all of .env, but only the tailscale container needs the auth key
POSTGRES_PASSWORD: ${DB_PASSWORD:?Set DB_PASSWORD in .env}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_DB: ${DB_DATABASE_NAME}
Expand All @@ -78,6 +79,7 @@ services:
env_file:
- .env
environment:
TS_AUTHKEY: "" # Empty: env_file loads all of .env, but only the tailscale container needs the auth key
AUTH_SECRET: ${AUTH_SECRET:?Set AUTH_SECRET in .env}
DATABASE_URL: "postgresql://${DB_USERNAME}:${DB_PASSWORD:?Set DB_PASSWORD in .env}@localhost:${SERVICEPORT_DATABASE}/${DB_DATABASE_NAME}"
depends_on:
Expand Down
2 changes: 1 addition & 1 deletion services/karakeep/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Set these values in `.env`:
- **Service name.** The application service is called `web`, not `application`, and its container is `app-karakeep-web`.
- **Extra containers.** The stack runs `chrome`, a headless browser that fetches the pages, and `meilisearch` for the search. They use the default Compose network, and Karakeep reaches them by their service name through Docker's DNS. Keep `TS_ACCEPT_DNS` disabled, because MagicDNS cannot resolve these names.
- **Images are set in `compose.yaml`.** The stack does not use `IMAGE_URL`. `KARAKEEP_VERSION` in `.env` selects the version of the Karakeep image.
- **The containers read the whole `.env` file.** The `web` and `meilisearch` containers load `.env` through `env_file`. Every variable in that file, including `TS_AUTHKEY`, is therefore present in their environment.
- **The containers read the whole `.env` file.** The `web` and `meilisearch` containers load `.env` through `env_file`. Every variable in that file is therefore present in their environment, except `TS_AUTHKEY`. `compose.yaml` sets it to an empty value for them, because only the `tailscale` container uses the auth key.

## First run

Expand Down
2 changes: 2 additions & 0 deletions services/karakeep/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ services:
env_file:
- .env
environment:
TS_AUTHKEY: "" # Empty: env_file loads all of .env, but only the tailscale container needs the auth key
MEILI_ADDR: http://meilisearch:7700
NEXTAUTH_SECRET: ${NEXTAUTH_SECRET:?Set NEXTAUTH_SECRET in .env}
MEILI_MASTER_KEY: ${MEILI_MASTER_KEY:?Set MEILI_MASTER_KEY in .env}
Expand Down Expand Up @@ -107,6 +108,7 @@ services:
env_file:
- .env
environment:
TS_AUTHKEY: "" # Empty: env_file loads all of .env, but only the tailscale container needs the auth key
MEILI_NO_ANALYTICS: "true"
MEILI_MASTER_KEY: ${MEILI_MASTER_KEY:?Set MEILI_MASTER_KEY in .env}
volumes:
Expand Down
2 changes: 1 addition & 1 deletion services/kitchenowl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Set `JWT_SECRET_KEY` in `.env` to a long random value, for example from `openssl
## Deviations from the standard setup

- **Service name.** The application service is called `kitchenowl`, not `application`.
- **The container reads the whole `.env` file.** The `kitchenowl` container loads `.env` through `env_file`. Every variable in that file, including `TS_AUTHKEY`, is therefore present in its environment.
- **The container reads the whole `.env` file.** The `kitchenowl` container loads `.env` through `env_file`. Every variable in that file is therefore present in its environment, except `TS_AUTHKEY`. `compose.yaml` sets it to an empty value for it, because only the `tailscale` container uses the auth key.

## First run

Expand Down
1 change: 1 addition & 0 deletions services/kitchenowl/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ services:
volumes:
- ./${SERVICE}-data/:/data
environment:
- TS_AUTHKEY= # Empty: env_file loads all of .env, but only the tailscale container needs the auth key
- JWT_SECRET_KEY=${JWT_SECRET_KEY:?Set JWT_SECRET_KEY in .env} # JWT secret key for authentication - make sure to set this in the .env file
## Optional for OIDC support - make sure to set these in the .env file if required!
#- FRONT_URL=${FRONT_URL}
Expand Down
2 changes: 1 addition & 1 deletion services/lube-logger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Set `LUBELOGGER_DOMAIN` in `.env` to the name of the device on your Tailnet, `lu
## Deviations from the standard setup

- **Device name.** `SERVICE` in `.env` is `lubelogger`, which differs from the name of this directory.
- **The container reads the whole `.env` file.** The `application` container loads `.env` through `env_file`. Every variable in that file, including `TS_AUTHKEY`, is therefore present in its environment.
- **The container reads the whole `.env` file.** The `application` container loads `.env` through `env_file`. Every variable in that file is therefore present in its environment, except `TS_AUTHKEY`. `compose.yaml` sets it to an empty value for it, because only the `tailscale` container uses the auth key.
- **Language settings.** `LC_ALL` and `LANG` in `.env` set the locale, which LubeLogger uses for dates and numbers.

## First run
Expand Down
2 changes: 2 additions & 0 deletions services/lube-logger/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ services:
container_name: app-${SERVICE} # Name for local container management
env_file:
- .env
environment:
- TS_AUTHKEY= # Empty: env_file loads all of .env, but only the tailscale container needs the auth key
volumes:
- ./${SERVICE}-data/data:/App/data
- ./${SERVICE}-data/keys:/root/.aspnet/DataProtection-Keys
Expand Down
2 changes: 1 addition & 1 deletion services/netbox/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Set these values in `.env`. Compose stops with an error if one of them is empty.
- **Service and container names.** The application service is called `netbox`, not `application`, and the containers are named `netbox`, `worker-netbox`, `netbox-postgres`, `netbox-redis`, and `netbox-rediscache`.
- **Configuration files.** This directory contains the NetBox configuration files in `./config`, which the stack mounts read-only. The `tailscale` container stores its files in the same folder.
- **Data folder.** The data is in `./netbox`, not in a `./netbox-data` folder.
- **The containers read the whole `.env` file.** All containers load `.env` through `env_file`. Every variable in that file, including `TS_AUTHKEY`, is therefore present in their environment.
- **The containers read the whole `.env` file.** All containers load `.env` through `env_file`. Every variable in that file is therefore present in their environment, except `TS_AUTHKEY`. `compose.yaml` sets it to an empty value for them, because only the `tailscale` container uses the auth key.
- **No administrator at the first start.** `SKIP_SUPERUSER=true` in `.env` stops NetBox from creating a default administrator.

## First run
Expand Down
7 changes: 7 additions & 0 deletions services/netbox/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ services:
network_mode: service:tailscale # Sidecar configuration to route the service through Tailscale
container_name: ${SERVICE} # Name for local container management
environment:
- TS_AUTHKEY= # Empty: env_file loads all of .env, but only the tailscale container needs the auth key
- SECRET_KEY=${SECRET_KEY:?Set SECRET_KEY in .env}
- TZ=${TZ}
volumes:
Expand Down Expand Up @@ -94,6 +95,8 @@ services:
image: docker.io/postgres:17-alpine
container_name: ${SERVICE}-postgres
env_file: ./.env
environment:
- TS_AUTHKEY= # Empty: env_file loads all of .env, but only the tailscale container needs the auth key
healthcheck:
test: pg_isready -h 127.0.0.1 -q -t 2 -d $$POSTGRES_DB -U $$POSTGRES_USER # Check if PostgreSQL accepts connections
start_period: 20s
Expand All @@ -109,6 +112,8 @@ services:
container_name: ${SERVICE}-redis
image: docker.io/valkey/valkey:8.1-alpine
env_file: ./.env
environment:
- TS_AUTHKEY= # Empty: env_file loads all of .env, but only the tailscale container needs the auth key
command:
- sh
- -c # this is to evaluate the $REDIS_PASSWORD from the env
Expand All @@ -126,6 +131,8 @@ services:
container_name: ${SERVICE}-rediscache
image: docker.io/valkey/valkey:8.1-alpine
env_file: ./.env
environment:
- TS_AUTHKEY= # Empty: env_file loads all of .env, but only the tailscale container needs the auth key
command:
- sh
- -c # this is to evaluate the $REDIS_PASSWORD from the env
Expand Down
2 changes: 1 addition & 1 deletion services/pocket-id/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This stack runs Pocket ID with a Tailscale sidecar, as described in [the standar

## Deviations from the standard setup

- **The container reads the whole `.env` file.** The `application` container loads `.env` through `env_file`. Every variable in that file, including `TS_AUTHKEY`, is therefore present in its environment.
- **The container reads the whole `.env` file.** The `application` container loads `.env` through `env_file`. Every variable in that file is therefore present in its environment, except `TS_AUTHKEY`. `compose.yaml` sets it to an empty value for it, because only the `tailscale` container uses the auth key.
- **Trusted proxy.** `TRUST_PROXY=true` in `.env` makes Pocket ID accept the client address that Tailscale Serve forwards.
- **User and group.** `PUID` and `PGID` come from `.env`.

Expand Down
1 change: 1 addition & 0 deletions services/pocket-id/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ services:
container_name: app-${SERVICE} # Name for local container management
env_file: .env
environment:
- TS_AUTHKEY= # Empty: env_file loads all of .env, but only the tailscale container needs the auth key
- ENCRYPTION_KEY=${ENCRYPTION_KEY:?Set ENCRYPTION_KEY in .env}
volumes:
- ./${SERVICE}-data:/app/data
Expand Down
2 changes: 1 addition & 1 deletion services/tandoor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Set these values in `.env`:

- **Extra container.** The stack runs a `database` container with PostgreSQL. It uses the network of the `tailscale` container as well, so Tandoor reaches it at `127.0.0.1`. PostgreSQL listens only on the loopback address of the device, so other devices on your Tailnet cannot reach it.
- **Service port.** `TANDOOR_PORT` makes Tandoor listen on the port from `SERVICEPORT`, which is `9001`.
- **The container reads the whole `.env` file.** The `application` container loads `.env` through `env_file`. Every variable in that file, including `TS_AUTHKEY`, is therefore present in its environment.
- **The container reads the whole `.env` file.** The `application` container loads `.env` through `env_file`. Every variable in that file is therefore present in its environment, except `TS_AUTHKEY`. `compose.yaml` sets it to an empty value for it, because only the `tailscale` container uses the auth key.

## First run

Expand Down
1 change: 1 addition & 0 deletions services/tandoor/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ services:
network_mode: service:tailscale # Sidecar configuration to route the service through Tailscale
container_name: app-${SERVICE} # Name for local container management
environment:
- TS_AUTHKEY= # Empty: env_file loads all of .env, but only the tailscale container needs the auth key
- TZ=${TZ}
- TANDOOR_PORT=${SERVICEPORT}
- SECRET_KEY=${SECRET_KEY:?Set SECRET_KEY in .env}
Expand Down