Skip to content

Commit

Permalink
Add files for running in docker
Browse files Browse the repository at this point in the history
  • Loading branch information
phavekes committed Feb 28, 2024
1 parent f771fba commit 78326f5
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 1 deletion.
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM maven:3.3-jdk-8

COPY entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh

#Start application
WORKDIR /usr/src/mymaven
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["bash"]
19 changes: 19 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: "3.5"
services:
intekenontvanger-generiek:
image: intekenontvanger-generiek
container_name: intekenontvanger-generiek
build:
context: .
ports:
- "8092:8092"
volumes:
- .:/usr/src/mymaven
restart: unless-stopped
healthcheck:
# yamllint disable-line rule:line-length
test: wget --no-verbose --tries=1 http://localhost:8092/internal/health -O - || exit 1
interval: 60s
timeout: 10s
retries: 2
start_period: 10s
3 changes: 3 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
# You can set here anything you need before starting the spring boot application
mvn spring-boot:run
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
<configuration>
<rules>
<requireJavaVersion>
<version>[1.8.0-0, 1.8.0-392]</version>
<version>[1.8.0-0, 1.8.0-402]</version>
</requireJavaVersion>
</rules>
</configuration>
Expand Down

0 comments on commit 78326f5

Please sign in to comment.