Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

Persists user credentials width docker

Started by Pablo 6 years ago · 2 replies · 676 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 complanar, 6 days ago
6 145 19 hours ago
Support · by Rick Beebe, 6 days ago
2 102 3 days ago
Support · by blu3prince, 3 days ago
0 54 3 days ago
Support · by alex, 4 days ago
2 95 3 days ago
Support · by Marcel, 2 weeks ago
1 145 4 days ago