Create a bcrypt password from a bcrypt genereting website, e.g. bcrypt-generator.
Important : make sure to enclose your password in single quotes when you run docker run
command :
$ echo $2b$12$coPqCsPtcF <-- not correct
b2
$ echo "$2b$12$coPqCsPtcF" <-- not correct
b2
$ echo '$2b$12$coPqCsPtcF' <-- correct
$2b$12$coPqCsPtcF
Important : Please note: don't wrap the generated hash password in single quotes when you use docker-compose.yml
. Instead, replace each $
symbol with two $$
symbols. For example:
- PASSWORD_HASH=$$2a$$12$$/XRblNgB2iRxjAwwu8XMkeIUWYKPqH98/eWB5rNXbIJJ.quV89ezG
This hash above is for the password 'password', obtained from the website referenced above and then inserted an additional $
before each existing $
symbol.
Read more here: