Merge branch 'master' of https://gitbox.apache.org/repos/asf/turbine-archetypes
diff --git a/src/main/resources/archetype-resources/docs/DOCKER-README.md b/src/main/resources/archetype-resources/docs/DOCKER-README.md
index bd9ae75..4610551 100644
--- a/src/main/resources/archetype-resources/docs/DOCKER-README.md
+++ b/src/main/resources/archetype-resources/docs/DOCKER-README.md
@@ -27,25 +27,31 @@
# Installation (running the app)
-- Change into directory target/docker-resources andf check the file docker-compose.yml, e.g. with
+- Change into directory target/docker-resources and check the file docker-compose.yml, e.g. with
-```sh
-cd <project>/target/docker-resources
-docker compose config
-```
+ cd <project>/target/docker-resources
+ docker compose config
+
Important: Check that /m2repo is properly mapped to your local maven repository in docker-compose.yml!
+### Note
+
+If running as integrationtest, you find the docker files in target/test-classes/projects/first/project/integrationtest/target/docker-resources.
+
- Build and start the services
-```sh
-docker compose build --no-cache
-docker compose up --detach
-```
+ docker compose build --no-cache
+ docker compose up --detach
+
+
+You might check the process with
+
+ docker-compose logs -f app
First time building might take a couple of minutes.
- - Now you can launch (in another terminal) your new Turbine application by default [http://localhost:8081/app]
+ - Now you can launch (in another terminal) your new Turbine application by default [http://localhost:8081/app] (http://localhost:8081/app)
### Note
diff --git a/src/main/resources/archetype-resources/pom.xml b/src/main/resources/archetype-resources/pom.xml
index 2c12e8f..92297bc 100644
--- a/src/main/resources/archetype-resources/pom.xml
+++ b/src/main/resources/archetype-resources/pom.xml
@@ -396,10 +396,10 @@
<maven.compile.target>1.8</maven.compile.target>
<project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
<log4j2.version>2.14.1</log4j2.version>
- <mysql.version>8.0.27</mysql.version>
+ <mysql.version>8.0.26</mysql.version>
<fulcrum.json>2.0.1</fulcrum.json>
<fulcrum.intake>2.0.0</fulcrum.intake>
- <fulcrum.security>2.0.1-SNAPSHOT</fulcrum.security>
+ <fulcrum.security>2.1.0</fulcrum.security>
<fulcrum.yaafi>1.0.8</fulcrum.yaafi>
<fulcrum.cache>2.0.0</fulcrum.cache>
<fulcrum.testcontainer>1.0.9</fulcrum.testcontainer>
diff --git a/src/main/resources/archetype-resources/src/main/docker-resources/db/Dockerfile b/src/main/resources/archetype-resources/src/main/docker-resources/db/Dockerfile
index 7ccfc0f..760cacb 100644
--- a/src/main/resources/archetype-resources/src/main/docker-resources/db/Dockerfile
+++ b/src/main/resources/archetype-resources/src/main/docker-resources/db/Dockerfile
@@ -1,7 +1,7 @@
#using multi-stage
# mariadb use docker-entrypoint
-FROM mysql:latest as builder
+FROM mysql:8.0.26 as builder
# That file does the DB initialization but also runs mysql daemon, by removing the last line it will only init
RUN ["/bin/sed", "-i", "s/exec \"$@\"/echo \"not running $@\"/", "/usr/local/bin/docker-entrypoint.sh"]
@@ -12,20 +12,30 @@
# docker run <image> /usr/sbin/mysqld --verbose --help | grep -A 1 "Default options"
ARG DB_CONTEXT
-ARG MYSQL_DATABASE
+ARG MYSQL_ROOT
ARG MYSQL_ROOT_PASSWORD
+ARG MYSQL_DATABASE
ARG MYSQL_USER
ARG MYSQL_PASSWORD
+# required, to create
+ENV DB_CONTEXT ${DB_CONTEXT}
+ENV MYSQL_ROOT=${MYSQL_ROOT}
+ENV MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
+
+ENV MYSQL_DATABASE=${MYSQL_DATABASE}
+ENV MYSQL_USER=${MYSQL_USER}
+ENV MYSQL_PASSWORD=${MYSQL_PASSWORD}
+ENV MYSQL_HOST=
+
# mount in docker-compose
-ADD #var("DB_CONTEXT:-.")/mysql/conf/my.cnf /etc/
-# mysql requires to be restricted
-RUN chmod a-w /etc/my.cnf
+#ADD #var("DB_CONTEXT:-.")/mysql/conf/my.cnf /etc/
# for logs
-RUN mkdir -p /mysql/log
-RUN chmod -R a+w /mysql
+#RUN mkdir -p /mysql/log
+#RUN chmod -R a+r /mysql/log
+RUN chmod -R a-w /etc/mysql/conf.d
COPY generated-sql/torque/mysql /generated-sql-init
# dependent sql should be name sorted after init.sql
@@ -35,17 +45,6 @@
COPY data/sample-mysql-data /generated-sql-post-init
RUN cat /generated-sql-post-init/*.sql > /docker-entrypoint-initdb.d/post_init.sql
-# required, to create
-
-ENV DB_CONTEXT ${DB_CONTEXT}
-ENV MYSQL_DATABASE ${MYSQL_DATABASE}
-ENV MYSQL_ROOT=root
-ENV MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
-
-ENV MYSQL_USER=${MYSQL_USER}
-ENV MYSQL_PASSWORD=${MYSQL_PASSWORD}
-ENV MYSQL_HOST=
-
# Need to change the datadir to something else that /var/lib/mysql because the parent docker file defines it as a volume.
# https://docs.docker.com/engine/reference/builder/#volume :
# Changing the volume from within the Dockerfile: If any build steps change the data within the volume after
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 6eca3ac..ee4cb2c 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
@@ -2,12 +2,11 @@
#
[mysqld]
+tls_version=TLSv1.2,TLSv1.3
-#
-# * Basic Settings
-#
+character_set_server=utf8mb4
+collation_server=utf8mb4_unicode_ci
-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
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 c5293be..aaad325 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
@@ -38,23 +38,19 @@
dockerfile: ./docker-resources/db/Dockerfile
args:
DB_CONTEXT: ./docker-resources/db
- MYSQL_DATABASE: ${turbine_database_name}
+ MYSQL_ROOT: root
MYSQL_ROOT_PASSWORD: changeit
+ MYSQL_DATABASE: ${turbine_database_name}
MYSQL_USER: ${turbine_database_user}
MYSQL_PASSWORD: ${turbine_database_password}
-
- environment:
- MYSQL_DATABASE: ${turbine_database_name}
- MYSQL_ROOT_PASSWORD: changeit
- MYSQL_USER: ${turbine_database_user}
- MYSQL_PASSWORD: ${turbine_database_password}
- DB_CONTEXT: ./docker-resources/db
+
+ # no environment needed here, only if using image in this file
volumes:
- - "./db/mysql/init:/docker-entrypoint-initdb.d"
- - "./db/mysql/conf:/etc/mysql/conf.d"
- - "./db/mysql/data:/data"
- - "./db/mysql/log:/mysql/log"
+ - ./db/mysql/init:/docker-entrypoint-initdb.d
+ - ./db/mysql/conf:/etc/mysql/conf.d
+ - ./db/mysql/data:/data
+ - ./db/mysql/log:/mysql/log
# default mysql persistent data
- db_data_${turbine_database_name}:/var/lib/mysql:rw
restart: always
@@ -64,8 +60,7 @@
#networks:
# - db
- #command: [mysqld, --character-set-server=utf8mb4, --collation-server=utf8mb4_unicode_ci]
- command: --default-authentication-plugin=mysql_native_password
+ command: [mysqld, --default-authentication-plugin=mysql_native_password]
# this might work only for *nix, check with docker image inspect db
volumes: