-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker Volumes #27
Comments
If you have the default configuration backend, you need to keep /var/lib/lemonldap-ng/conf/ |
Your production docker image does not have VOLUME inside. It is not only question |
If I want custom theme and LDAP auth? |
Hey @luckyraul you don't necessarily need a volume to de declared in the Dockerfile, you can declare a volume mount in your If you want to add a custom theme to the container, you can use volumes mount as well, or extends Lemonldap-ng image to copy your own custom theme inside the container. LDAP auth conf is also explained here: https://lemonldap-ng.org/documentation/latest/authldap?s[]=ldap RUN \
# LDAP SSL Certificates (will be stored in an mount volume)
mkdir -p /etc/ldap/certs && \
{ \
echo 'TLS_REQCERT never'; \
echo 'TLS_CACERT /etc/ldap/certs/ca-cert.pem'; \
echo 'TLS_CACERTDIR /etc/ldap/certs'; \
} > /etc/ldap/ldap.conf Then use a volume mount to set your certificate, such as volumes:
- ../certificates/ca-cert-local.pem:/etc/ldap/certs/ca-cert.pem:ro |
Thanks, I know about docker-compose. |
If I share the conf folder, It is not starting. You probably should copy the default config if it is not exists in the entrypoint
|
Also You should create folders inside /var/lib/lemonldap-ng/sessions
|
Indeed you need to put a configuration file in your local volume first which has to be named You can find sample of those files in gitlab repo here and here. You might also need to dig a bit into Nginx or Apache2 conf. Take a look at this repo as well (it is also on Docker Hub), I haven't tried it out myself but this guy seems to have spent a lot of time to make Lemonldap-ng work out of the box. |
At first I've added named volume for session file too In your service: lemonldap:
....
volumes:
- lemonldap-sessions:/var/lib/lemonldap-ng/sessions
- lemonldap-psessions:/var/lib/lemonldap-ng/psessions
... And in the volumes section: volumes:
lemonldap-sessions:
driver: local
lemonldap-psessions:
driver: local But regarding performances, you better set up a Redis or MySQL server for sessions storage. It is also more reliable for persisting data. |
You don't understand the issue =) It should be normalized in the entrypoint.sh |
My bad, normally you shouldn’t have to do that, I guess your issue is related to the user that runs the web server and/or lemonldap’s folders users and permissions. I’ve run into similar issues myself. |
Yes, I did chown |
@luckyraul could you test the latest commits? #28 |
Sorry for late answer
|
Hello @luckyraul , see #30 from @tdemaret |
Sorry for late answer, I think you need to chown after copy...
|
What folders should I share within image to keep settings ?
I use 2.0.5 currently
The text was updated successfully, but these errors were encountered: