diff --git a/app-monolith/Dockerfile b/app-monolith/Dockerfile new file mode 100644 index 0000000..ad6efa8 --- /dev/null +++ b/app-monolith/Dockerfile @@ -0,0 +1,6 @@ +FROM openjdk:8u151-jdk-alpine3.7 +MAINTAINER MichaƂ Michaluk + +EXPOSE 8080 +ADD target/*.jar app.jar +ENTRYPOINT ["java", "-jar","/app.jar", "--spring.profiles.active=docker"] diff --git a/app-monolith/src/main/resources/application-docker.properties b/app-monolith/src/main/resources/application-docker.properties new file mode 100644 index 0000000..7ec62e7 --- /dev/null +++ b/app-monolith/src/main/resources/application-docker.properties @@ -0,0 +1,3 @@ +spring.datasource.url=jdbc:postgresql://database:5432/postgres +spring.datasource.username=postgres +spring.datasource.password=postgres diff --git a/app-monolith/src/main/resources/application-openshift.properties b/app-monolith/src/main/resources/application-openshift.properties index 1ee7dff..37b8d93 100644 --- a/app-monolith/src/main/resources/application-openshift.properties +++ b/app-monolith/src/main/resources/application-openshift.properties @@ -1,3 +1,3 @@ spring.datasource.url=jdbc:postgresql://postgresql:5432/postgres spring.datasource.username=postgres -spring.datasource.password=D8pmLhcl6MVSIlyq \ No newline at end of file +spring.datasource.password=D8pmLhcl6MVSIlyq diff --git a/app-monolith/src/main/resources/application.properties b/app-monolith/src/main/resources/application.properties index 6ac7266..6014b5e 100644 --- a/app-monolith/src/main/resources/application.properties +++ b/app-monolith/src/main/resources/application.properties @@ -3,7 +3,7 @@ spring.jpa.database=default spring.jpa.generate-ddl=false spring.datasource.url=jdbc:postgresql://localhost:5432/postgres spring.datasource.username=postgres -spring.datasource.password= +spring.datasource.password=postgres spring.datasource.driver-class-name=org.postgresql.Driver liquibase.change-log=classpath:/schema/db.changelog.xml logging.pattern.console=%d{yyyy-MM-dd HH:mm:ss} %-5level %logger{36} - %msg%n diff --git a/app-monolith/src/main/resources/tasks.txt b/app-monolith/src/main/resources/tasks.txt deleted file mode 100644 index b3152c8..0000000 --- a/app-monolith/src/main/resources/tasks.txt +++ /dev/null @@ -1,18 +0,0 @@ - -Aggregate Persistence: -1) normalisation of aggregate entities (Daily Demand) -2) optimistic force increment -3) mapper (Daily Demand) -4) wrapper (Product Demand) -5) event sourcing (Product Demand) - -Rest: -1) crud for json document -2) query calculated -2') query for pre-calculated projection -3) naive REST aggregate commands -4) command based rest -5) application domain - -6) Eventual consistency - Read your own writes (E-tag, Expect, Retry-After) diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..e5ee37f --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,24 @@ +version: '3' + +services: + backend: + build: + context: ./app-monolith/ + ports: + - "8080:8080" + links: + - database + database: + image: postgres:10 + ports: + - "5432:5432" + environment: + - POSTGRES_USER=postgres + - POSTGRES_PASSWORD=postgres + - POSTGRES_DB=postgres + volumes: + - data:/var/lib/postgresql/data + +volumes: + data: + driver: local