File tree Expand file tree Collapse file tree 3 files changed +29
-0
lines changed Expand file tree Collapse file tree 3 files changed +29
-0
lines changed Original file line number Diff line number Diff line change 1+ target
2+ logs
Original file line number Diff line number Diff line change 1+ FROM eclipse-temurin:17-jdk-jammy AS builder
2+ WORKDIR /opt/app
3+ COPY .mvn/ .mvn
4+ COPY mvnw pom.xml ./
5+ RUN ./mvnw dependency:go-offline
6+ COPY ./src ./src
7+ RUN ./mvnw clean package -D skipTests
8+
9+ FROM eclipse-temurin:17-alpine
10+ WORKDIR /opt/app
11+ EXPOSE 8080
12+ COPY --from=builder /opt/app/target/*.jar /opt/app/*.jar
13+ ENTRYPOINT ["java" , "-jar" , "/opt/app/*.jar" ]
Original file line number Diff line number Diff line change @@ -2,6 +2,20 @@ version: '3.1'
22
33services :
44
5+ app :
6+ image : ' order_management'
7+ build :
8+ context : .
9+ depends_on :
10+ - postgres
11+ ports :
12+ - " 8080:8080"
13+ environment :
14+ - SPRING_DATASOURCE_URL=jdbc:postgresql://postgres:5432/order_management
15+ - SPRING_DATASOURCE_USERNAME=postgres
16+ - SPRING_DATASOURCE_PASSWORD=postgres
17+ - SPRING_JPA_HIBERNATE_DDL_AUTO=none
18+
519 postgres :
620 image : postgres:15.2-alpine
721 restart : always
You can’t perform that action at this time.
0 commit comments