Skip to content
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

Use custom templates in lizmap-docker #27

Closed
wants to merge 2 commits into from

Conversation

skvo1977
Copy link

Update docker-compose.yml
Add - ${LIZMAP_DIR}/var/lizmap-themes-default:/www/lizmap/var/themes/default
To use custom templates as described in the documentation https://docs.lizmap.com/current/en/publish/customization/template.html
Additionally, I manually created a directory ${LIZMAP_DIR}/var/lizmap-themes-default in my lizmap-docker directory.
It would be better to create this directory when installing lizmap-docker-compose - need to make changes to a file entrypoint.sh in section _makedirs()?

Update docker-compose.yml
Add - ${LIZMAP_DIR}/var/lizmap-themes-default:/www/lizmap/var/themes/default 
To use custom templates as described in the documentation  https://docs.lizmap.com/current/en/publish/customization/template.html
Additionally, I manually created a directory ${LIZMAP_DIR}/var/lizmap-themes-default in my lizmap-docker directory. 
It would be better to create this directory when installing lizmap-docker-compose - need to make changes to a file entrypoint.sh in section  _makedirs()?
@dmarteau
Copy link
Member

It would be better to create this directory when installing lizmap-docker-compose - need to make changes to a file entrypoint.sh in section _makedirs()?

Yes, you should add an entry to https://github.com/3liz/lizmap-docker-compose/blob/master/entrypoint.sh#L34, otherwise Docker will create the directory as owned by root.

Add line to create directory for use custom templates -  $INSTALL_DEST/var/lizmap-themes-default \
@skvo1977
Copy link
Author

Thank you. I added these changes.

@skvo1977
Copy link
Author

skvo1977 commented Jun 17, 2022

I found that when I mount the folder ${LIZMAP_DIR}/var/lizmap-themes-default:/www/lizmap/var/themes/default
I lose the template files for the admin interface. On default installation lizmap-docker-compose folder /www/lizmap/var/themes/default contains files. I undestand these files will need to copy in the folder ${LIZMAP_DIR}/var/lizmap-themes-default during installation lizmap-docker-compose. But I still don't understand how to do it. Because I'm not an advanced docker-user yet.
I copied the necessary files manually ...
I'm going to read the docker-compose documentation :)

@dmarteau
Copy link
Member

I undestand these files will need to copy in the folder ${LIZMAP_DIR}/var/lizmap-themes-default during installation lizmap-docker-compose

This is handled in the container at runtime, this is actually a workaround the fact that lizmap configuration system is not (yet) well suited for docker use and assume that user config/default config is mixed. There is drop-in for configuration snippets that ease the process of customizing of a Docker lizmap installation but we still have some corner-cases.

@skvo1977
Copy link
Author

skvo1977 commented Jun 17, 2022

I understand it.
Probably for now it makes sense to leave the use of custom templates for lizmap-docker-compose as a special case for user choice and self-configuration.
But the possibility of using lizmap in docker looks very attractive.
Thank you for your help and great product.

@skvo1977 skvo1977 closed this Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants