Docker (preview) "recreate" makes staff password reset

I am using the “Docker (preview)” way of self-hosting.

Every time that I pull a new image and I do “docker compose up -d --force-recreate”, the staff member’s password is lost. That is, old password doesn’t work anymore. I am the only staff member (and admin of the site).

If relevant: I just did a “docker compose pull” to get the latest feature (members OTP login), but it has happened before as well.

Does anyone see a similar behavior and can provide guidance on what I am doing wrong?

Thanks!

Well you’re forcing it to recreate. Why are you doing that?

Why can’t you just do “docker compose up -d” which is the proper command anyways after downing the container.

So to update,
”docker compose pull” and then “docker compose down” and then “docker compose up -d” should work as intended.

Thanks, I have likely misunderstood the docs when it says to force-recreate after a config change.

Anyway, can you explain why the staff password is lost after a force recreate? (I thought it was written hashed in the mysql volume)

Because your DB is also written in the same Compose file. When you use the flag –force-recreate you’re literally giving it the command “Force Recreate.”
If you use docker compose up -d you’re telling docker compose to up the container and detach it (meaning it doesn’t need to be supervised. The minute you leave the terminal, it still runs.)
So if you ever just use docker compose up you’ll see a bunch of logs, and when you close terminal, your site will be back down as if you triggered docker compose downcommand.

I don’t believe that “–force-recreate” does that. The DB volume is kept, and in fact all the posts, the subscribers, etc., everything is saved in that volume. It’s only the staff password that is lost.
Is there a way for me to double check on this behavior?