docker-compose is back with both backend & database
This commit is contained in:
6
app-monolith/Dockerfile
Normal file
6
app-monolith/Dockerfile
Normal file
@@ -0,0 +1,6 @@
|
||||
FROM openjdk:8u151-jdk-alpine3.7
|
||||
MAINTAINER Michał Michaluk <michal.michaluk@bottega.com.pl>
|
||||
|
||||
EXPOSE 8080
|
||||
ADD target/*.jar app.jar
|
||||
ENTRYPOINT ["java", "-jar","/app.jar", "--spring.profiles.active=docker"]
|
||||
@@ -0,0 +1,3 @@
|
||||
spring.datasource.url=jdbc:postgresql://database:5432/postgres
|
||||
spring.datasource.username=postgres
|
||||
spring.datasource.password=postgres
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
24
docker-compose.yml
Normal file
24
docker-compose.yml
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user