Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pocketbase to version 0.23.12 and create initial superuser #1983

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
22 changes: 22 additions & 0 deletions pocketbase/data/migrations/initial_superuser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// https://pocketbase.io/docs/js-migrations/#creating-initial-superuser
// pb_migrations/1687801090_initial_superuser.js

migrate((app) => {
let superusers = app.findCollectionByNameOrId("_superusers")

let record = new Record(superusers)

// note: the values can be eventually loaded via $os.getenv(key)
// or from a special local config file
record.set("email", "[email protected]")
record.set("password", "umbrel-pocketbase")

app.save(record)
}, (app) => { // optional revert operation
try {
let record = app.findAuthRecordByEmail("_superusers", "[email protected]")
app.delete(record)
} catch {
// silent errors (probably already deleted)
}
})
5 changes: 3 additions & 2 deletions pocketbase/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "3.7"

Check notice on line 1 in pocketbase/docker-compose.yml

View workflow job for this annotation

GitHub Actions / Lint apps

Potentially using unsafe user in service "app"

The default container user "root" can lead to security vulnerabilities. If you are using the root user, please try to specify a different user (e.g. "1000:1000") in the compose file or try to set the UID/PUID and GID/PGID environment variables to 1000.

services:
app_proxy:
Expand All @@ -8,12 +8,13 @@
PROXY_AUTH_ADD: "false"

app:
image: ghcr.io/muchobien/pocketbase:0.23.7@sha256:782f35e9f518f8b12152dca355de666f54002a3822765ff518dbcb21b0f8d0e8
image: ghcr.io/muchobien/pocketbase:0.23.12@sha256:ceaa734390fd0a83ac795fe99e22b6481bc757b45ef016234f2b56ea43fc9209
# pocketbase needs to run as root
# user: "1000:1000"
restart: on-failure
stop_grace_period: 1m
volumes:
- ${APP_DATA_DIR}/data/data:/pb_data
- ${APP_DATA_DIR}/data/public:/pb_public
- ${APP_DATA_DIR}/data/hooks:/pb_hooks
- ${APP_DATA_DIR}/data/hooks:/pb_hooks
- ${APP_DATA_DIR}/data/migrations:/pb_migrations
19 changes: 13 additions & 6 deletions pocketbase/umbrel-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ id: pocketbase
name: PocketBase
tagline: Open Source backend for your next SaaS and Mobile app in 1 file
category: developer
version: "0.23.7"
version: "0.23.12"
port: 5400
description: >-
PocketBase is an open source backend consisting of embedded database (SQLite) with realtime subscriptions, built-in auth management, convenient dashboard UI and simple REST-ish API.
Expand All @@ -29,6 +29,8 @@ description: >-
Use as a standalone app OR as a framework, that you can extend via Go and JavaScript hooks to create your own custom portable backend.
developer: PocketBase
website: https://pocketbase.io/
defaultUsername: "[email protected]"
defaultPassword: "umbrel-pocketbase"
submitter: Sharknoon
submission: https://github.com/getumbrel/umbrel-apps/pull/1082
repo: https://github.com/pocketbase/pocketbase
Expand All @@ -41,10 +43,15 @@ gallery:
path: /_/
dependencies: []
releaseNotes: >-
This release includes improvements to error handling and stability:
- Fixed issues with JavaScript error handling
- Enhanced system reliability
- Improved overall performance
⚠️ This release includes a security fix for email template handling. If you use custom mail templates with user-provided content, please update immediately.


Full release notes are found at https://github.com/pocketbase/pocketbase/releases
Key improvements in this release:
- Fixed a security vulnerability in email template handling
- Enhanced system stability and performance
- Improved error handling
- Added version mismatch warning logs for SQLite dependencies
- Removed file size restrictions for backup uploads


Full release notes are found at https://github.com/pocketbase/pocketbase/releases
Loading