File tree Expand file tree Collapse file tree 2 files changed +23
-7
lines changed Expand file tree Collapse file tree 2 files changed +23
-7
lines changed Original file line number Diff line number Diff line change 1+ FROM eclipse-temurin:17-jdk-alpine
2+ VOLUME /tmp
3+ COPY target/order-0.0.1-SNAPSHOT.jar order-0.0.1-SNAPSHOT.jar
4+ ENTRYPOINT ["java" ,"-jar" ,"/order-0.0.1-SNAPSHOT.jar" ]
5+
Original file line number Diff line number Diff line change @@ -2,21 +2,32 @@ version: '3.1'
22
33services :
44 postgres :
5- container_name : order-postgresDB
65 image : postgres:14.5-alpine
76 user : postgres
87 environment :
9- POSTGRES_USER : postgres
10- POSTGRES_PASSWORD : postgres
11- POSTGRES_DB : order_db
8+ - POSTGRES_USER=postgres
9+ - POSTGRES_PASSWORD=postgres
10+ - POSTGRES_DB=order_db
11+
1212 ports :
13- - ' 5432:5432'
13+ - 5432:5432
1414 volumes :
1515 - order-postgres:/var/lib/postgresql/data
16-
17-
1816
1917
18+ order :
19+ depends_on :
20+ - postgres
21+ build :
22+ context : .
23+ dockerfile : Dockerfile
24+ environment :
25+ - SPRING.DATASOURCE.URL=jdbc:postgresql://postgres:5432/order_db
26+ - SPRING.DATASOURCE.USERNAME=postgres
27+ - SPRING.DATASOURCE.PASSWORD=postgres
28+ ports :
29+ - 8080:8080
30+
2031volumes :
2132 order-postgres :
2233 driver : local
You can’t perform that action at this time.
0 commit comments