Skip to content

Commit dbaff21

Browse files
Add Dockerfile and compose.yaml
1 parent 20bc2ff commit dbaff21

2 files changed

Lines changed: 42 additions & 0 deletions

File tree

Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM eclipse-temurin:17-jdk-focal
2+
3+
WORKDIR /app
4+
5+
COPY .mvn/ .mvn
6+
COPY mvnw pom.xml ./
7+
RUN chmod +x mvnw
8+
RUN ./mvnw dependency:go-offline
9+
10+
COPY src ./src
11+
12+
CMD ["./mvnw", "spring-boot:run"]

compose.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,31 @@
1+
version: '3.8'
2+
13
services:
4+
app:
5+
build:
6+
context: .
7+
dockerfile: Dockerfile
8+
ports:
9+
- "8080:8080"
10+
volumes:
11+
- .:/app
12+
- maven_cache:/root/.m2
13+
environment:
14+
SPRING_PROFILES_ACTIVE: dev
15+
JAVA_OPTS: "-Xmx512m -Xms256m"
16+
networks:
17+
- app-network
18+
healthcheck:
19+
test: [ "CMD", "curl", "-f", "http://localhost:8080/health/health" ]
20+
interval: 1m30s
21+
timeout: 10s
22+
retries: 3
23+
start_period: 40s
24+
25+
networks:
26+
app-network:
27+
driver: bridge
28+
29+
volumes:
30+
maven_cache:
31+
driver: local

0 commit comments

Comments
 (0)