@simplehomelab/deployrr 6.0.35 → 6.0.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,24 @@
1
1
  #!/bin/bash
2
2
  # Pre-install script for Cloudflare Tunnel
3
3
  # Creates the hosts file needed for container mount
4
+ #
5
+ # IMPORTANT: Docker auto-creates missing bind-mount paths as directories.
6
+ # If a previous install failed, "hosts" may exist as a directory instead of
7
+ # a file, and `touch` silently succeeds on directories without converting them.
8
+ # We must detect and fix this before creating the file.
9
+
10
+ local hostsPath="$DOCKER_FOLDER/appdata/cloudflare-tunnel/hosts"
4
11
 
5
12
  sudo mkdir -p "$DOCKER_FOLDER/appdata/cloudflare-tunnel"
6
- sudo touch "$DOCKER_FOLDER/appdata/cloudflare-tunnel/hosts"
7
- sudo chmod 644 "$DOCKER_FOLDER/appdata/cloudflare-tunnel/hosts"
13
+
14
+ # If hosts exists as a directory (from a failed Docker run), remove it first
15
+ if [[ -d "$hostsPath" ]]; then
16
+ dev_echo "Removing stale hosts directory (created by Docker on previous failed install)"
17
+ sudo rm -rf "$hostsPath"
18
+ fi
19
+
20
+ # Create hosts as a file with the system's /etc/hosts as a baseline
21
+ if [[ ! -f "$hostsPath" ]]; then
22
+ sudo cp /etc/hosts "$hostsPath"
23
+ fi
24
+ sudo chmod 644 "$hostsPath"
@@ -19,4 +19,5 @@ services:
19
19
  environment:
20
20
  TZ: $TZ
21
21
  DOCKER_HOST: $DOCKER_HOST
22
+ SECRET_ENCRYPTION_KEY: $HOMARR_SECRET_ENCRYPTION_KEY
22
23
  # DOCKER-LABELS-PLACEHOLDER
@@ -61,6 +61,14 @@
61
61
  "min": 1,
62
62
  "max": 65535
63
63
  }
64
+ },
65
+ {
66
+ "name": "HOMARR_SECRET_ENCRYPTION_KEY",
67
+ "description": "Encryption key for secrets (auto-generated, 64-char hex)",
68
+ "type": "string",
69
+ "generate": "openssl_rand_hex_32",
70
+ "prompt": false,
71
+ "required": true
64
72
  }
65
73
  ]
66
74
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simplehomelab/deployrr",
3
- "version": "6.0.35",
3
+ "version": "6.0.36",
4
4
  "description": "Deployrr - Docker homelab deployment manager",
5
5
  "bin": {
6
6
  "deployrr": "./bin/deployrr-init.sh"