diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index cc15c2d..9ceb1ae 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -58,10 +58,12 @@ jobs:
run: |
IMAGE_URL=$IMAGE_REPOSITORY:$GITHUB_REF_NAME.${{ github.sha }}
LATEST_TAG=$IMAGE_REPOSITORY:latest
- TAGS=$IMAGE_URL,$LATEST_TAG
+ BRANCH_TAG=$IMAGE_REPOSITORY:$GITHUB_REF_NAME
+ TAGS=$IMAGE_URL,$LATEST_TAG,$BRANCH_TAG
echo "::set-output name=image::$IMAGE_URL"
echo ::set-output name=version::${VERSION}
echo ::set-output name=latest_tag::${LATEST_TAG}
+ echo ::set-output name=branch_tag::${BRANCH_TAG}
echo ::set-output name=tags::${TAGS}
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
@@ -72,7 +74,9 @@ jobs:
# Build the docker image
- name: Build Server Projects
- run: mvn -pl webapp jib:dockerBuild -Dimage=${{ steps.prep_docker.outputs.image }} -Dspring.profiles.active=POSTGRESQL
+ env:
+ SPRING_PROFILES_ACTIVE: POSTGRESQL
+ run: docker build -f docker/Dockerfile -t ${{ steps.prep_docker.outputs.image }} .
- name: Log in to Docker Hub
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
@@ -84,6 +88,7 @@ jobs:
id: push-image
run: |
docker tag ${{ steps.prep_docker.outputs.image }} ${{ steps.prep_docker.outputs.latest_tag }}
+ docker tag ${{ steps.prep_docker.outputs.image }} ${{ steps.prep_docker.outputs.branch_tag }}
docker push ${{ steps.prep_docker.outputs.image }}
docker push ${{ steps.prep_docker.outputs.latest_tag }}
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 17e8034..f1a9139 100644
--- a/.gitignore
+++ b/.gitignore
@@ -47,4 +47,6 @@ translations.pot
create-db-schema.sql
.DS_Store
-.env
\ No newline at end of file
+.env
+
+postgres-data
\ No newline at end of file
diff --git a/Makefile b/Makefile
index c81aad8..533583a 100644
--- a/Makefile
+++ b/Makefile
@@ -20,7 +20,7 @@ clean:
mvn clean
.PHONY: build-image
-build:
+build-image:
@echo "Building the project"
mvn install -DskipTests
docker build \
@@ -37,6 +37,10 @@ build:
run-image:
docker compose up
+.PHONY: run-image-postgres
+run-image-postgres:
+ docker compose -f docker-compose.postgres.yml up
+
define setup_env
$(eval ENV_FILE := $(1))
diff --git a/docker-compose.postgres.yml b/docker-compose.postgres.yml
new file mode 100644
index 0000000..29773fb
--- /dev/null
+++ b/docker-compose.postgres.yml
@@ -0,0 +1,38 @@
+services:
+ nexus-command:
+ image: savantly/nexus-command:latest
+ ports:
+ - "8080:8080"
+ restart: unless-stopped
+ environment:
+ - LOGGING_LEVEL_ROOT=WARN
+ - ECLIPSELINK_LOGGING_LEVEL=WARNING
+ - JDBC_LOGGING=false
+ - nexus.modules.organizations.enabled=true
+ - nexus.modules.projects.enabled=true
+ - nexus.modules.franchise.enabled=true
+ - nexus.modules.web.enabled=true
+ - nexus.modules.org-web.enabled=true
+ - nexus.modules.security.enabled=true
+ - nexus.modules.flow.enabled=true
+ - app.security.enabled=false
+ - SPRING_PROFILES_ACTIVE=POSTGRESQL
+ - SPRING_DATASOURCE_URL=jdbc:postgresql://nexus-postgres:5432/nexus
+ - SPRING_DATASOURCE_USERNAME=nexus
+ - SPRING_DATASOURCE_PASSWORD=nexus
+ - SPRING_DATASOURCE_DRIVER_CLASS_NAME=org.postgresql.Driver
+
+ volumes:
+ - ./webapp/log4j2-test.xml:/app/BOOT-INF/classes/log4j2.xml
+
+ nexus-postgres:
+ image: postgres:14
+ environment:
+ POSTGRES_USER: nexus
+ POSTGRES_PASSWORD: nexus
+ POSTGRES_DB: nexus
+ ports:
+ - "5432:5432"
+ restart: unless-stopped
+ volumes:
+ - ./postgres-data:/var/lib/postgresql/data
\ No newline at end of file
diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh
index 510c36f..22fa66a 100755
--- a/docker/entrypoint.sh
+++ b/docker/entrypoint.sh
@@ -8,4 +8,4 @@ ls -al
sleep 2
-java ${JAVA_OPTS} -cp /app -Dserver.port=${PORT:-8080} -javaagent:/app/spring-instrument.jar -Djava.security.disableSystemPropertiesFile=true --add-opens java.base/sun.net=ALL-UNNAMED org.springframework.boot.loader.JarLauncher
+java ${JAVA_OPTS} -cp /app -Dserver.port=${PORT:-8080} -javaagent:/app/spring-instrument.jar -Djava.security.disableSystemPropertiesFile=true --add-opens java.base/sun.net=ALL-UNNAMED org.springframework.boot.loader.launch.JarLauncher
diff --git a/module-flow/pom.xml b/module-flow/pom.xml
index 1ce791f..d2205d3 100644
--- a/module-flow/pom.xml
+++ b/module-flow/pom.xml
@@ -60,15 +60,7 @@
-
- org.springframework.boot
- spring-boot-starter-data-jpa
-
-
- org.springframework.boot
- spring-boot-starter-web
-
diff --git a/module-organization-fees/src/main/java/net/savantly/nexus/orgfees/dom/invoice/MonthlyOrgReport.java b/module-organization-fees/src/main/java/net/savantly/nexus/orgfees/dom/invoice/MonthlyOrgReport.java
index 47daa3b..f67ddd9 100644
--- a/module-organization-fees/src/main/java/net/savantly/nexus/orgfees/dom/invoice/MonthlyOrgReport.java
+++ b/module-organization-fees/src/main/java/net/savantly/nexus/orgfees/dom/invoice/MonthlyOrgReport.java
@@ -50,7 +50,8 @@
@XmlType(propOrder = {
"organization",
"year",
- "month"
+ "month",
+ "totalAmount",
})
@XmlAccessorType(XmlAccessType.FIELD)
public class MonthlyOrgReport {
diff --git a/webapp/pom.xml b/webapp/pom.xml
index 4d04be9..5efe332 100644
--- a/webapp/pom.xml
+++ b/webapp/pom.xml
@@ -1,5 +1,7 @@
-
+
4.0.0
@@ -9,7 +11,7 @@
nexus-command-webapp
- SimpleApp (JPA) - Webapp
+ Nexus Command - Webapp
Assembles and runs both the Wicket viewer and the Restfulobjects viewer
@@ -50,7 +52,8 @@
exec
- ${env.HOME}/.m2/repository/org/springframework/spring-instrument/${spring-framework.version}/spring-instrument-${spring-framework.version}.jar
+
+ ${env.HOME}/.m2/repository/org/springframework/spring-instrument/${spring-framework.version}/spring-instrument-${spring-framework.version}.jar
@@ -69,12 +72,12 @@
${project.groupId}
web-module
-
+
${project.groupId}
web-module-api
-
+
${project.groupId}
organizations-web-module
@@ -141,7 +144,7 @@
org.apache.causeway.viewer
causeway-viewer-wicket-applib
-
+
org.apache.causeway.testing
causeway-testing-h2console-ui
@@ -156,7 +159,8 @@
org.apache.causeway.valuetypes
causeway-valuetypes-markdown-metamodel
-
+
org.apache.causeway.valuetypes
causeway-valuetypes-markdown-ui-wkt
@@ -173,7 +177,6 @@
-
org.apache.causeway.extensions
causeway-extensions-flyway-impl
@@ -270,7 +273,7 @@
-
+
org.springdoc
springdoc-openapi-webmvc-core
1.6.14
@@ -283,7 +286,7 @@
-
+
org.apache.causeway.testing
causeway-testing-integtestsupport-applib
@@ -333,8 +336,8 @@
org.postgresql
- postgresql
-
+ postgresql
+
@@ -384,4 +387,5 @@
-
+
+
\ No newline at end of file
diff --git a/webapp/src/main/resources/config/application-POSTGRESQL.properties b/webapp/src/main/resources/config/application-POSTGRESQL.properties
index 87813ab..90a93ea 100644
--- a/webapp/src/main/resources/config/application-POSTGRESQL.properties
+++ b/webapp/src/main/resources/config/application-POSTGRESQL.properties
@@ -4,12 +4,16 @@ spring.datasource.driver-class-name=org.postgresql.Driver
spring.datasource.username=simpleapp
spring.datasource.password=simpleapp
+eclipselink.deploy-on-startup=true
eclipselink.ddl-generation=create-or-extend-tables
spring.jpa.defer-datasource-initialization=false
+spring.jpa.generate-ddl=false
spring.sql.init.mode=always
spring.sql.init.schema-locations=classpath*:db/migration/POSTGRESQL/_schema.sql
spring.flyway.enabled=false
spring.flyway.default-schema=public
-spring.flyway.schemas=public
\ No newline at end of file
+spring.flyway.schemas=public
+spring.flyway.baseline-on-migrate=true
+spring.flyway.locations=classpath:db/migration/POSTGRESQL
\ No newline at end of file