Compare commits

..

1 Commits

Author SHA1 Message Date
shamoon
4d8a587d8b Update docker-entrypoint.sh 2025-07-16 09:44:23 -07:00
4 changed files with 25 additions and 9 deletions

View File

@@ -17,13 +17,15 @@ if [ -e /app/config ]; then
CURRENT_UID=$(stat -c %u /app/config) CURRENT_UID=$(stat -c %u /app/config)
CURRENT_GID=$(stat -c %g /app/config) CURRENT_GID=$(stat -c %g /app/config)
if [ "$CURRENT_UID" -ne "$PUID" ] || [ "$CURRENT_GID" -ne "$PGID" ]; then if [ "$CURRENT_UID" -eq "$PUID" ] && [ "$CURRENT_GID" -eq "$PGID" ]; then
echo "Fixing ownership of /app/config" echo "/app/config already owned by correct UID/GID, skipping chown"
if ! chown -R "$PUID:$PGID" /app/config 2>/dev/null; then if ! [ -w /app/config ]; then
echo "Warning: Could not chown /app/config; continuing anyway" echo "Warning: /app/config is not writable by UID $PUID — this can happen with bind mounts"
echo "Hint: Run 'chmod -R u+rwX /path/to/config' on the host"
fi fi
else else
echo "/app/config already owned by correct UID/GID, skipping chown" echo "Fixing ownership of /app/config"
chown -R "$PUID:$PGID" /app/config 2>/dev/null || echo "Warning: Could not chown /app/config"
fi fi
else else
echo "/app/config does not exist; skipping ownership check" echo "/app/config does not exist; skipping ownership check"

View File

@@ -225,8 +225,20 @@ const widgetExample = {
#### `method` #### `method`
The `method` represents the HTTP method that should be used to make the API request. The default value is `GET`. Note that `POST` requests are not allowed via the The `method` property is a string that represents the HTTP method that should be used to make the API request. The default value is `GET`.
widget API and require the use of a custom proxy.
```js
const widgetExample = {
api: "{url}/api/{endpoint}",
mappings: {
// `/api/stats`
stats: {
endpoint: "stats",
method: "POST",
},
},
};
```
#### `headers` #### `headers`
@@ -239,6 +251,7 @@ const widgetExample = {
// `/api/stats` // `/api/stats`
stats: { stats: {
endpoint: "stats", endpoint: "stats",
method: "POST",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
@@ -258,6 +271,7 @@ const widgetExample = {
// `/api/graphql` // `/api/graphql`
stats: { stats: {
endpoint: "graphql", endpoint: "graphql",
method: "POST",
body: { body: {
query: ` query: `
query { query {

View File

@@ -9,7 +9,7 @@ The widget has two modes, a single system with detailed info if `systemId` is pr
The `systemID` is the `id` field on the collections page of Beszel under the PocketBase admin panel. You can also use the 'nice name' from the Beszel UI. The `systemID` is the `id` field on the collections page of Beszel under the PocketBase admin panel. You can also use the 'nice name' from the Beszel UI.
A "superuser" is currently required to access the data from the Beszel API. A "superuser" is currently required to access the data from tbe Beszel API.
Allowed fields for 'overview' mode: `["systems", "up"]` Allowed fields for 'overview' mode: `["systems", "up"]`
Allowed fields for a single system: `["name", "status", "updated", "cpu", "memory", "disk", "network"]` Allowed fields for a single system: `["name", "status", "updated", "cpu", "memory", "disk", "network"]`

View File

@@ -1,6 +1,6 @@
{ {
"name": "homepage", "name": "homepage",
"version": "1.4.0", "version": "1.3.2",
"private": true, "private": true,
"scripts": { "scripts": {
"preinstall": "npx only-allow pnpm", "preinstall": "npx only-allow pnpm",