diff --git a/blueprints/pocketbase/docker-compose.yml b/blueprints/pocketbase/docker-compose.yml index e39b2336..f54bac37 100644 --- a/blueprints/pocketbase/docker-compose.yml +++ b/blueprints/pocketbase/docker-compose.yml @@ -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: {} diff --git a/blueprints/pocketbase/template.toml b/blueprints/pocketbase/template.toml index fb5c6fea..bb8f4fd3 100644 --- a/blueprints/pocketbase/template.toml +++ b/blueprints/pocketbase/template.toml @@ -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" diff --git a/meta.json b/meta.json index 7f7a1a57..2422a351 100644 --- a/meta.json +++ b/meta.json @@ -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",