From 2770690a54d8f851ea1b47b040c547e6aac08dcb Mon Sep 17 00:00:00 2001 From: peskyadmin Date: Sat, 1 Nov 2025 15:15:56 -0400 Subject: [PATCH] day0-untested --- README.md | 49 ++++++++++++++++++------------------- docker-compose.yml | 30 ++++++++++++++++++----- tailscale/config/serve.json | 2 +- 3 files changed, 49 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 421f25e..b072c81 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# {{Service}} with Tailscale Integration +# Immich Machine Learning with Tailscale Integration -![{{Service}} with Tailscale](https://damconsulting.llc/images/logo_yellow.svg "{{Service}}") +![Immich Machine Learning with Tailscale](https://damconsulting.llc/images/logo_yellow.svg "Immich Machine Learning") -This project sets up a {{Service}} instance with Tailscale VPN integration using Docker Compose. It creates a secure, private network connection for your {{Service}} instance using Tailscale. +This project sets up a Immich Machine Learning instance with Tailscale VPN integration using Docker Compose. It creates a secure, private network connection for your Immich Machine Learning instance using Tailscale. ## Prerequisites @@ -12,21 +12,20 @@ This project sets up a {{Service}} instance with Tailscale VPN integration using ## Project Structure ``` -ts-{{service}}/ +ts-immich-machine-learning/ ├── docker-compose.yml ├── tailscale/ -│ ├── tailscale-data/ # Persistent Tailscale state -│ └── config/ # Tailscale configuration files -└── {{service}}/ - └── config/ # {{Service}} configuration files + ├── tailscale-data/ # Persistent Tailscale state + └── config/ # Tailscale configuration files + ``` ## Setup Instructions 1. **Clone the Repository** ```bash - git clone https://gitea.damconsulting.llc/DAM/ts-{{service}} - cd ts-{{service}} + git clone https://gitea.damconsulting.llc/DAM/ts-immich-machine-learning + cd ts-immich-machine-learning ``` 2. Create Required Directories ```bash @@ -37,7 +36,7 @@ ts-{{service}}/ - Optionally, update the file in `tailscale/config/serve.json` if you need specific Tailscale serve configurations - CAUTION: Changing `"${TS_CERT_DOMAIN}:443": false` to `true` will expose the service to the internet -4. Configure {{Service}} +4. Configure Immich Machine Learning - See the [documentation]({{service_docs}}) for configuration options 5. Start the Services @@ -48,30 +47,30 @@ ts-{{service}}/ 6. Wait for Certificate to propagate [~2m] 7. Login - - After starting the services your service should be available via tailnet at https://{{service}}.{{YOUR_TAILNET_DOMAIN}}.ts.net ie https://{{service}}.tail12345.ts.net/ + - After starting the services your service should be available via tailnet at https://immich-machine-learning.{{YOUR_TAILNET_DOMAIN}}.ts.net ie https://immich-machine-learning.tail12345.ts.net/ ## Services -### {{service}}-ts (Tailscale) +### immich-machine-learning-ts (Tailscale) - Runs Tailscale VPN client - Image: tailscale/tailscale:latest -- Container name: {{service}}-ts -- Hostname: {{service}} +- Container name: immich-machine-learning-ts +- Hostname: immich-machine-learning - Requires NET_ADMIN and SYS_MODULE capabilities - Persists state in ./tailscale/tailscale-data - Uses configuration from ./tailscale/config -### {{service}} +### immich-machine-learning -- Depends on {{service}}-ts service +- Depends on immich-machine-learning-ts service ## Usage -- After starting the services your service should be available via tailnet at `https://{{service}}.{{YOUR_TAILNET_DOMAIN}}.ts.net` ie `https://{{service}}.tail12345.ts.net/` +- After starting the services your service should be available via tailnet at `https://immich-machine-learning.{{YOUR_TAILNET_DOMAIN}}.ts.net` ie `https://immich-machine-learning.tail12345.ts.net/` - To manually get the Tailscale IP/hostname of your container: ```bash - docker logs {{service}}-ts + docker logs immich-machine-learning-ts ``` Look for the Tailscale IP address in the logs. @@ -90,19 +89,19 @@ ts-{{service}}/ ## Troubleshooting - Check container logs: ```bash - docker logs {{service}}-ts - docker logs {{service}} + docker logs immich-machine-learning-ts + docker logs immich-machine-learning ``` - Ensure your Tailscale auth key is valid and not expired - Verify the configuration files have proper permissions - Make sure required directories exist before starting ## Notes -- The {{Service}} service uses the Tailscale service's network stack via `network_mode: service:{{service}}-ts` +- The Immich Machine Learning service uses the Tailscale service's network stack via `network_mode: service:immich-machine-learning-ts` - Direct port mapping is disabled by default as Tailscale handles the networking - Services restart automatically unless explicitly stopped - For more information: - Tailscale documentation: https://tailscale.com/kb/ - - {{Service}} [documentation]({{service_docs}}) - - {{Service}} [repository]({{service_repo}}) - - {{Service}} [linuxserve.io]({{service_lcsr}}) \ No newline at end of file + - Immich Machine Learning [documentation]({{service_docs}}) + - Immich Machine Learning [repository]({{service_repo}}) + - Immich Machine Learning [linuxserve.io]({{service_lcsr}}) \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 72aa767..d43dc1a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,8 +1,8 @@ services: - {{service}}-ts: + immich-machine-learning-ts: image: tailscale/tailscale:latest - hostname: {{service}} - container_name: {{service}}-ts + hostname: immich-machine-learning + container_name: immich-machine-learning-ts environment: - TS_AUTHKEY={{YOUR_TAILSCALE_AUTHKEY}} - TS_STATE_DIR=/var/lib/tailscale @@ -15,7 +15,25 @@ services: - net_admin - sys_module restart: unless-stopped - {{service-compose}} - network_mode: service:{{service}}-ts + + immich-machine-learning: + container_name: immich_machine_learning + # For hardware acceleration, add one of -[armnn, cuda, rocm, openvino, rknn] to the image tag. + # Example tag: ${IMMICH_VERSION:-release}-cuda + image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release} + # extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration + # file: hwaccel.ml.yml + # service: cpu # set to one of [armnn, cuda, rocm, openvino, openvino-wsl, rknn] for accelerated inference - use the `-wsl` version for WSL2 where applicable + volumes: + - model-cache:/cache + env_file: + - .env + network_mode: service:immich-machine-learning-ts depends_on: - - {{service}}-ts \ No newline at end of file + - immich-machine-learning-ts + restart: always + healthcheck: + disable: false + +volumes: + model-cache: diff --git a/tailscale/config/serve.json b/tailscale/config/serve.json index 121ffb8..9516c34 100644 --- a/tailscale/config/serve.json +++ b/tailscale/config/serve.json @@ -8,7 +8,7 @@ "${TS_CERT_DOMAIN}:443": { "Handlers": { "/": { - "Proxy": "http://127.0.0.1:3000" + "Proxy": "http://127.0.0.1:3003" } } }