-
Notifications
You must be signed in to change notification settings - Fork 3
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 simplification #61
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cloned this repo and used the lutece_init_0,7 branch, In order to test I first had to get database init working by pulling in the database init structure missing in the Paris lutece-core develop branch from the master branch there. After I verified that I was able to init a database ...
I tried removing the lutece.sql file from the data directory, and pruning the database volume. docker-compose up
then correctly generated the database from the war. I then pruned the volume and put the lutece.sql dump into he data directory - docker-compose up
found the dump and populated the database. Finally, I pruned the volume and deleted the mysql image. docker-compose up
constructed the mysql image and populated it with the dump. Everything worked perfectly.
The only issue I saw - not related to this PR - was in dumping the database. For some unknown reason, stderr seemed to be merged with stdout - so that initially, loading the dump failed because the first line of lutece.sql was this (dump command was docker exec -it mysql mysqldump -u <user> -p<password> lutece > lutece.sql
):
mysqldump: [Warning] Using a password on the command line interface can be insecure.
this will probably not be an issue in production, just something to be aware of. this hack works:
docker exec -it mysql mysqldump -u <user> -p<password> lutece 2>&1 | grep -v 'mysqldump: \[Warning\]' > lutece.sql
The container uses a Maria db command line tools instead of MySQL tools. It may be worth switching to the official MySQL 8 client. |
Switched the container to use MySQL 8 client tools. Seems less spammy. |
This is a big change.
The docker configuration has been simplified. Now there is just a modified tomcat container which also does initialization (lutece-init 0.7) and a MySQL container. The Tomcat being used now is Tomcat 9 with OpenJdk 8 instead of Tomcat 8 with OpenJdk 8. In addition MySQL 8 client tools are used for greater compatibility.
The production docker support has been removed because it will now be handled by building custom images based on lutece-init.