Pocketbase persistent data
I deployed a custom version of pocketbase, and i created a volume at
/pb_data
but i have an issue with the persistence isn't working, i guess it's a problem with the path/directory.
33 Replies
Project ID:
4e78d088-677d-4ecb-ba7a-8eb3bd3bd174
4e78d088-677d-4ecb-ba7a-8eb3bd3bd174
what does --dir represent in this case?
i think it represents the directory where PocketBase will store its data
have you tried
/pb/pb_data
?i did not
switch to the v2 runtime and then use target ports on your domain
"then use target ports on your domain" what you mean
instead of me explaining, remove and re-add your domain after switching to the v2 runtime and you will see what i mean
same
from your logs -
since it's the default folder i'll remove that
should i do the same for --dir/pb_data ?
the template doesnt set a dir, so maybe omit that too
meh..
0.056 go: go.mod requires go >= 1.22 (running go 1.21.13; GOTOOLCHAIN=local)
I need go minimal 1.22 how to update this in docker image ?line 2 of your dockerfile
ok now maybe the right path to the volume is /pb_data
I would first leave it at
/pb/pb_data
ok i redeploy to test it
ok this path isn't working
what about pocket base have you changed anyway?
Okey with
pb/pb_data
did
- i updated it deployed
- backup my data
- tested the data persistence with a redeploy
But everything got erasedcan you try the pocket base template please
the pocketbase template works fine but i have a custom main.go pocketbase code
you have no issues with data persistence using the template, correct?
yep
okay then it's something you are misconfiguring
please send the GitHub repo for your pocketbase
Im doing the test again with volume on
/pb_data
.going forward let's leave the volume mounted to
/pb/pb_data
as that's what the template has the volume mounted toF.... it's same... both are not working
^
here it is
https://github.com/asmirbe/pocketbase
GitHub
GitHub - asmirbe/pocketbase
Contribute to asmirbe/pocketbase development by creating an account on GitHub.
Can't understand what is causing the issue....
then I'm unsure, all I have for you right now is that something you have done is misconfigured.