feat(pocketbase): update docker-compose.yml and template configuration (#363)

* feat(pocketbase): update docker-compose.yml and template configuration

- Update PocketBase to use latest version instead of specific version
- Add environment variables for configuration
- Implement named volumes for data persistence
- Improve healthcheck configuration with better parameters
- Add encryption support via environment variable
- Update template.toml to include new configuration options
- Configure proper volume mounts and environment variables
- Set default timezone to Europe/Berlin

* feat(pocketbase): refactor docker-compose and template configuration for improved clarity and consistency
This commit is contained in:
Jainil Prajapati
2025-09-21 11:07:27 +05:30
committed by GitHub
parent cb209004bc
commit e61f9020db
3 changed files with 28 additions and 16 deletions

View File

@@ -1,18 +1,22 @@
version: "3.8"
services:
pocketbase:
image: ghcr.io/muchobien/pocketbase:latest
restart: unless-stopped
ports:
- "8090"
image: elestio/pocketbase:${SOFTWARE_VERSION_TAG}
restart: always
user: "0:0"
expose:
- 8090
volumes:
- "/etc/dokploy/templates/${HASH}/data:/app/pb_data"
- "/etc/dokploy/templates/${HASH}/migrations:/app/pb_migrations"
- "/etc/dokploy/templates/${HASH}/hooks:/app/pb_hooks"
- "/etc/dokploy/templates/${HASH}/public:/app/pb_public"
- pocketbase-data:/pb_data
environment:
- EMAIL=${EMAIL}
- ADMIN_PASSWORD=${ADMIN_PASSWORD}
healthcheck:
test: wget -q --spider http://localhost:8090/api/health || exit 1
interval: 60s
timeout: 5s
test: ["CMD", "wget", "-qO-", "http://localhost:8090/_/"]
interval: 30s
timeout: 10s
retries: 3
start_period: 5s
volumes:
pocketbase-data: {}

View File

@@ -1,11 +1,19 @@
[variables]
main_domain = "${domain}"
admin_email = "${email}"
admin_password = "${password:32}"
[config]
env = {}
mounts = []
[[config.domains]]
serviceName = "pocketbase"
port = 8090
host = "${main_domain}"
[config.env]
SOFTWARE_VERSION_TAG = "latest"
EMAIL = "${admin_email}"
ADMIN_PASSWORD = "${admin_password}"
[[config.mounts]]
name = "pocketbase-data"
mountPath = "/pb_data"

View File

@@ -4002,7 +4002,7 @@
"id": "pocketbase",
"name": "PocketBase",
"description": "Open Source backend in 1 file",
"version": "v0.28.0",
"version": "latest",
"logo": "logo.svg",
"links": {
"github": "https://github.com/pocketbase/pocketbase",