mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-20 23:05:49 +00:00
before Jenkins task
This commit is contained in:
parent
ad772369cc
commit
2dcecd50a8
3 changed files with 28 additions and 2 deletions
20
Dockerfile
Normal file
20
Dockerfile
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
FROM eclipse-temurin:17-jdk AS build
|
||||||
|
|
||||||
|
WORKDIR /build
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y maven
|
||||||
|
|
||||||
|
COPY pom.xml .
|
||||||
|
COPY src ./src
|
||||||
|
|
||||||
|
RUN mvn clean package -DskipTests
|
||||||
|
|
||||||
|
FROM eclipse-temurin:17-jdk AS runtime
|
||||||
|
|
||||||
|
WORKDIR /build
|
||||||
|
|
||||||
|
COPY --from=build /build/target/spring-petclinic-*.jar app.jar
|
||||||
|
|
||||||
|
EXPOSE 8080
|
||||||
|
|
||||||
|
CMD ["java", "-jar", "app.jar"]
|
|
@ -1,4 +1,8 @@
|
||||||
services:
|
services:
|
||||||
|
app:
|
||||||
|
build: .
|
||||||
|
ports:
|
||||||
|
- 8080:8080
|
||||||
mysql:
|
mysql:
|
||||||
image: mysql:9.1
|
image: mysql:9.1
|
||||||
ports:
|
ports:
|
||||||
|
@ -19,3 +23,4 @@ services:
|
||||||
- POSTGRES_PASSWORD=petclinic
|
- POSTGRES_PASSWORD=petclinic
|
||||||
- POSTGRES_USER=petclinic
|
- POSTGRES_USER=petclinic
|
||||||
- POSTGRES_DB=petclinic
|
- POSTGRES_DB=petclinic
|
||||||
|
|
||||||
|
|
5
pom.xml
5
pom.xml
|
@ -260,9 +260,10 @@
|
||||||
<goals>
|
<goals>
|
||||||
<goal>check</goal>
|
<goal>check</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<phase>validate</phase>
|
<!-- changed from validate to none -->
|
||||||
|
<phase>none</phase>
|
||||||
<configuration>
|
<configuration>
|
||||||
<configLocation>src/checkstyle/nohttp-checkstyle.xml</configLocation>
|
<configLocation>src/checkstyle/nohttp-checkstyle.xml</configLocation>
|
||||||
<sourceDirectories>${basedir}</sourceDirectories>
|
<sourceDirectories>${basedir}</sourceDirectories>
|
||||||
<includes>**/*</includes>
|
<includes>**/*</includes>
|
||||||
<excludes>**/.git/**/*,**/.idea/**/*,**/target/**/,**/.flattened-pom.xml,**/*.class</excludes>
|
<excludes>**/.git/**/*,**/.idea/**/*,**/target/**/,**/.flattened-pom.xml,**/*.class</excludes>
|
||||||
|
|
Loading…
Reference in a new issue