Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Support

Persists user credentials width docker

Started by Pablo 6 years ago · 2 replies · 523 views
6 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

6 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 ?

6 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 Thomas, 1 week ago
3 92 2 hours ago
Support · by Anna, 3 days ago
2 94 23 hours ago
Support · by Justin Young, 24 hours ago
1 62 24 hours ago
Support · by Duc , 1 week ago
2 98 6 days ago
Support · by Colin Hume, 1 week ago
2 91 6 days ago