This is an automated email from the ASF dual-hosted git repository. gk pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/turbine-archetypes.git
commit 152149d22c4b89e6887577142018fa47ea0fe369 Author: gemkall <[email protected]> AuthorDate: Tue Jul 27 17:06:37 2021 +0200 fix mysql datadir, use https in maven settings, which is required in maven 3.8.1, fix docs --- src/main/resources/archetype-resources/docs/DOCKER-README.md | 8 +++----- .../src/main/docker-resources/db/mysql/conf/my.cnf | 9 +++------ .../src/main/docker-resources/docker-compose.yml | 1 + 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src/main/resources/archetype-resources/docs/DOCKER-README.md b/src/main/resources/archetype-resources/docs/DOCKER-README.md index f5e2b4e..219c3a9 100644 --- a/src/main/resources/archetype-resources/docs/DOCKER-README.md +++ b/src/main/resources/archetype-resources/docs/DOCKER-README.md @@ -110,7 +110,7 @@ If not yet done, build on the host with mvn clean install -f ../pom.xml -Pdocker The app service uses later a volume, which maps to the local maven repository, which you may need/not need. The db service uses mysql-latest (currently 8.x), you may replace it with a fixed release tag. -If previously build, you may want to delete all volumes and containers +If previously build, you may want to delete all volumes (this will delete all tables in /var/lib/mysql) and containers docker-compose down -v @@ -156,7 +156,7 @@ You could follow the logs with docker-compose logs -f app or docker-compose logs ### Db Service ``` -docker-compose run --rm db /bin/sh --build-arg DB_CONTEXT=./docker-resources/db +docker-compose run --rm db /bin/sh ``` Extract data in db service @@ -185,9 +185,7 @@ ls -la /myapp // should list pom.xml ... ### Powershell -- Use Powershell - -- Replace in volume mapping for host repo path (maven localRepository) backslashes with slashes "/" in docker-compose.yml. +- You may have to replace in volume mapping for host repo path (maven localRepository) backslashes with slashes "/" in docker-compose.yml. - check COMPOSE_CONVERT_WINDOWS_PATHS, https://docs.docker.com/compose/reference/envvars/#compose_convert_windows_paths diff --git a/src/main/resources/archetype-resources/src/main/docker-resources/db/mysql/conf/my.cnf b/src/main/resources/archetype-resources/src/main/docker-resources/db/mysql/conf/my.cnf index 940f84b..6eca3ac 100644 --- a/src/main/resources/archetype-resources/src/main/docker-resources/db/mysql/conf/my.cnf +++ b/src/main/resources/archetype-resources/src/main/docker-resources/db/mysql/conf/my.cnf @@ -6,17 +6,14 @@ # # * Basic Settings # -#user = mysql -#pid-file = /var/run/mysqld/mysqld.pid -#socket = /var/run/mysqld/mysqld.sock character-set-server=utf8 # in mysql image VOLUME /var/lib/mysql and any changes to this directory # during build process might got lost after the build step is done # match db_data in docker-compose - -datadir = /initialized-db +# therefore we us a copy in Dockerfile, no uncomment needed +# datadir = /initialized-db #tmpdir = /tmp @@ -29,6 +26,6 @@ datadir = /initialized-db tee=/mysql/log/log.out [mysqld_safe] -#socket = /var/run/mysqld/mysqld.sock + nice = 0 diff --git a/src/main/resources/archetype-resources/src/main/docker-resources/docker-compose.yml b/src/main/resources/archetype-resources/src/main/docker-resources/docker-compose.yml index 34b93ec..026a5de 100644 --- a/src/main/resources/archetype-resources/src/main/docker-resources/docker-compose.yml +++ b/src/main/resources/archetype-resources/src/main/docker-resources/docker-compose.yml @@ -67,6 +67,7 @@ services: #command: [mysqld, --character-set-server=utf8mb4, --collation-server=utf8mb4_unicode_ci] command: --default-authentication-plugin=mysql_native_password + # this might work only for *nix, check with docker image inspect db volumes: db_data_${turbine_database_name}:
