You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@turbine.apache.org by gk...@apache.org on 2021/07/27 15:06:58 UTC

[turbine-archetypes] branch master updated: fix mysql datadir, use https in maven settings, which is required in maven 3.8.1, fix docs

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


The following commit(s) were added to refs/heads/master by this push:
     new 9749f94  fix mysql datadir, use https in maven settings, which is required in maven 3.8.1, fix docs
9749f94 is described below

commit 9749f942e523511a4164ef7c24b2ae002933a8c2
Author: gemkall <ge...@fu-berlin.de>
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/app/settings.xml                 | 10 +++++-----
 .../src/main/docker-resources/db/mysql/conf/my.cnf             |  9 +++------
 .../src/main/docker-resources/docker-compose.yml               |  1 +
 4 files changed, 12 insertions(+), 16 deletions(-)

diff --git a/src/main/resources/archetype-resources/docs/DOCKER-README.md b/src/main/resources/archetype-resources/docs/DOCKER-README.md
index b6be1e2..88afced 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/app/settings.xml b/src/main/resources/archetype-resources/src/main/docker-resources/app/settings.xml
index c7d36af..1e1a7d2 100644
--- a/src/main/resources/archetype-resources/src/main/docker-resources/app/settings.xml
+++ b/src/main/resources/archetype-resources/src/main/docker-resources/app/settings.xml
@@ -19,7 +19,7 @@
       <repositories>
         <repository>
           <id>releases</id>
-          <url>http://central</url>
+          <url>https://central</url>
           <releases><enabled>true</enabled></releases>
           <snapshots><enabled>false</enabled></snapshots>
         </repository>
@@ -27,13 +27,13 @@
           <releases><enabled>true</enabled></releases>
           <snapshots><enabled>true</enabled></snapshots>
           <id>snapshots</id>
-          <url>http://snapshots</url>
+          <url>https://snapshots</url>
         </repository>
       </repositories>
      <pluginRepositories>
         <pluginRepository>
           <id>releases</id>
-          <url>http://central</url>
+          <url>https://central</url>
           <releases><enabled>true</enabled></releases>
           <snapshots><enabled>true</enabled></snapshots>
         </pluginRepository>
@@ -41,7 +41,7 @@
          <releases><enabled>true</enabled></releases>
           <snapshots><enabled>true</enabled></snapshots>
           <id>snapshots</id>
-          <url>http://snapshots</url>
+          <url>https://snapshots</url>
         </pluginRepository>
       </pluginRepositories>
     </profile>
@@ -54,7 +54,7 @@
         <pluginRepository>
           <id>central</id>
           <name>Maven Plugin Repository</name>
-          <url>http://repo1.maven.org/maven2</url>
+          <url>https://repo1.maven.org/maven2</url>
           <layout>default</layout>
           <snapshots>
             <enabled>false</enabled>
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}: