From f046bcaebcfe234d3579e8ca80db8b63d9957097 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sat, 3 Feb 2024 20:25:15 -0800 Subject: [PATCH] Start working on docker compose. --- wise-webapp/Dockerfile | 5 +++++ wise-webapp/docker/compose.yaml | 9 +++++++++ wise-webapp/pom.xml | 12 ++++++++++++ wise-webapp/src/main/resources/application.yml | 6 ++++++ wise-webapp/src/main/resources/banner.txt | 6 ++++++ 5 files changed, 38 insertions(+) create mode 100644 wise-webapp/Dockerfile create mode 100644 wise-webapp/docker/compose.yaml create mode 100644 wise-webapp/src/main/resources/banner.txt diff --git a/wise-webapp/Dockerfile b/wise-webapp/Dockerfile new file mode 100644 index 00000000..db706678 --- /dev/null +++ b/wise-webapp/Dockerfile @@ -0,0 +1,5 @@ +FROM amazoncorretto:17.0.10 + +VOLUME /tmp +COPY target/wisemapping-api.jar app.jar +ENTRYPOINT ["sh", "-c", "java ${JAVA_OPTS} -jar /app.jar ${0} ${@}"] \ No newline at end of file diff --git a/wise-webapp/docker/compose.yaml b/wise-webapp/docker/compose.yaml new file mode 100644 index 00000000..cea52055 --- /dev/null +++ b/wise-webapp/docker/compose.yaml @@ -0,0 +1,9 @@ +services: + database: + image: 'postgres:15.2' + ports: + - '5432' + environment: + - 'POSTGRES_USER=myuser' + - 'POSTGRES_DB=mydatabase' + - 'POSTGRES_PASSWORD=secret' \ No newline at end of file diff --git a/wise-webapp/pom.xml b/wise-webapp/pom.xml index 7501fe88..2c2cfad0 100644 --- a/wise-webapp/pom.xml +++ b/wise-webapp/pom.xml @@ -214,6 +214,7 @@ + org.apache.maven.plugins @@ -222,6 +223,17 @@ org.springframework.boot spring-boot-maven-plugin + + + repackage + + repackage + + + wisemapping-api + + + diff --git a/wise-webapp/src/main/resources/application.yml b/wise-webapp/src/main/resources/application.yml index bb85a5f0..23dde817 100755 --- a/wise-webapp/src/main/resources/application.yml +++ b/wise-webapp/src/main/resources/application.yml @@ -1,6 +1,12 @@ # SpringBoot Configuration ... spring: + output: + ansi: + enabled=always: + application: + name: wisemapping-api + title: wisemapping-api datasource: driver-class-name: org.hsqldb.jdbc.JDBCDriver password: '' diff --git a/wise-webapp/src/main/resources/banner.txt b/wise-webapp/src/main/resources/banner.txt new file mode 100644 index 00000000..e499e84f --- /dev/null +++ b/wise-webapp/src/main/resources/banner.txt @@ -0,0 +1,6 @@ +| | |' |\ /| ' /\ |~~\~|~ +| | ||(~/~/| \/ |/~~||~~\|~~\||/~\ /~~| /__\ |__/ | + \/ \/ |_)\/_| |\__||__/|__/|| |\__| / \| _|_ + | | \__| +${application.title} ${application.version} +Powered by Spring Boot ${spring-boot.version} \ No newline at end of file