Skip to content

Commit 80cfbae

Browse files
committed
Added Dockerfile and modified docker compose file
Signed-off-by: Achanandhi-M <[email protected]>
1 parent 08591f9 commit 80cfbae

File tree

9 files changed

+581
-874
lines changed

9 files changed

+581
-874
lines changed

employee-manager/Dockerfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Use a Java 17 runtime (Debian-based, works on Apple Silicon)
2+
FROM eclipse-temurin:17-jdk
3+
4+
# Set the working directory inside the container
5+
WORKDIR /app
6+
7+
# Install Maven
8+
RUN apt-get update && apt-get install -y maven
9+
10+
# Copy the current directory contents into the container at /app
11+
COPY . /app/
12+
13+
# Build the binary
14+
RUN mvn clean install -Dmaven.test.skip=true
15+
16+
17+
# Expose the port your Spring Boot app runs on
18+
EXPOSE 8080
19+
20+
# Run the application
21+
ENTRYPOINT ["java", "-jar", "target/springbootapp-0.0.1-SNAPSHOT.jar"]
Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,31 @@
1-
version: '3.7'
21
services:
2+
java-app:
3+
build:
4+
context: .
5+
container_name: javaApp
6+
depends_on:
7+
- postgres
8+
ports:
9+
- "8080:8080"
10+
networks:
11+
- keploy-network
312
postgres:
4-
image: postgres:latest
13+
image: "postgres:15.2"
14+
container_name: postgres
515
restart: always
616
environment:
717
- POSTGRES_DB=keploy-test
818
- POSTGRES_USER=keploy-user
919
- POSTGRES_PASSWORD=keploy
1020
ports:
1121
- '5432:5432'
22+
networks:
23+
- keploy-network
1224
volumes:
1325
# - ./postgres-data:/var/lib/postgresql/data
1426
# copy the sql script to create tables
15-
- ./src/main/resources/data.sql:/docker-entrypoint-datadb.d/data.sql
27+
- ./src/main/resources/data.sql:/docker-entrypoint-datadb.d/data.sql
28+
29+
networks:
30+
keploy-network:
31+
external: true

employee-manager/keploy.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,13 @@ buildDelay: 30
1616
test:
1717
selectedTests: {}
1818
globalNoise:
19-
global: {}
20-
test-sets: {}
19+
#global: {
20+
# "body":{
21+
# "timestamp":"",
22+
# }
23+
#}
24+
25+
test-sets: {}
2126
delay: 5
2227
host: ""
2328
port: 0

0 commit comments

Comments
 (0)