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

Persists user credentials width docker

Started by Pablo 6 years ago · 2 replies · 525 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 Duc , 3 hours ago
1 25 3 hours ago
Support · by Thomas, 1 week ago
3 103 12 hours ago
Support · by Anna, 3 days ago
2 99 1 day ago
Support · by Justin Young, 1 day ago
1 66 1 day ago
Support · by Duc , 1 week ago
2 101 6 days ago