Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Persists user credentials width docker

Started by Pablo 7 years ago · 2 replies · 815 views
7 years ago

I'm using the official docker image for Grav. Everything works fine, however, every time I restart the docker I need to create a user to log in again. Is there a way to persist the login credential in my docker container? I tried to create user.yaml file with a password and mirror in the docker container as suggested in this post: but didn't work.

This is my user.yaml file

plugins/flex-objects/blueprints/flex-objects/user.yaml

YAML
user: 'developer'
password: Asdf1234

appreciate any help

7 years ago

I have no clue how the flex-objects plugin works, as I never tried it.
however, storing custom yaml files in the plugin directory is not a recommended procedure.
custom yaml files normally reside under config/plugins and then override the defaults.
did you check if / where a yaml file is created when you create a user in the admin ?

7 years ago

@pablodarde, I'm afraid your have stored the file in the wrong location.

Yaml files containing user accounts are stored in /user/accounts/username.yamlwith the following content:

YAML
fullname: username
password: UserPassword

Note the matching username in filename and fullname. Btw. replace username with a proper name of your choice.

Suggested topics

Topic Participants Replies Views Activity
Support · by TomW, 2 weeks ago
8 228 10 hours ago
Support · by alex, 2 months ago
8 667 1 day ago
Support · by Supple, 5 days ago
1 98 1 day ago
Support · by TomW, 1 week ago
3 160 3 days ago
Support · by TomW, 6 days ago
2 106 6 days ago