Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#apt install openjdk-17-jdk -y
#apt install maven -y
FROM maven:3.8.3-openjdk-17 AS builder
WORKDIR /app
COPY . .
RUN mvn clean package
#stage:2
FROM tomcat:9.0-jdk17-temurin AS runtime
RUN rm -rf /usr/local/tomcat/webapps/*
COPY --from=builder /app/target/*.war /usr/local/tomcat/webapps/ROOT.war
EXPOSE 8080
16 changes: 16 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: "3.9"
services:
netflix-app:
build:
context: .
container_name: netflixapp
networks:
- netflixapp-nw
ports:
- "8080:8080"
restart: always


networks:
netflixapp-nw:

114 changes: 67 additions & 47 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,51 +1,71 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>in.RAHAM</groupId>
<artifactId>NETFLIX</artifactId>
<packaging>war</packaging>
<version>1.2.2</version>
<name>Java Home myweb</name>
<url>http://maven.apache.org</url>

<properties>
<docker.image.prefix>kammana</docker.image.prefix>
</properties>
<dependencies>
<dependency>
<groupId>com.oracle.bedrock</groupId>
<artifactId>bedrock-runtime-maven</artifactId>
<version>5.1.2</version>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>in.RAHAM</groupId>
<artifactId>NETFLIX</artifactId>
<packaging>war</packaging>
<version>1.2.2</version>
<name>Java Home myweb</name>
<url>http://maven.apache.org</url>

</dependencies>

<distributionManagement>
<snapshotRepository>
<id>nexusRepo</id>
<url>http://13.233.230.166:8081/repository/maven-snapshots/</url>
</snapshotRepository>

<repository>
<id>nexusRepo</id>
<url>http://13.233.230.166:8081/repository/maven-releases/</url>
</repository>
</distributionManagement>

<pluginRepositories>
<pluginRepository>
<id>maven1</id>
<name>Maven.org</name>
<url>http://repo1.maven.org/maven2</url>
</pluginRepository>
</pluginRepositories>
<properties>
<docker.image.prefix>kammana</docker.image.prefix>
<maven.compiler.release>17</maven.compiler.release>
</properties>

<dependencies>
<dependency>
<groupId>com.oracle.bedrock</groupId>
<artifactId>bedrock-runtime-maven</artifactId>
<version>5.1.2</version>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>

<distributionManagement>
<snapshotRepository>
<id>nexusRepo</id>
<url>http://13.233.230.166:8081/repository/maven-snapshots/</url>
</snapshotRepository>
<repository>
<id>nexusRepo</id>
<url>http://13.233.230.166:8081/repository/maven-releases/</url>
</repository>
</distributionManagement>

<pluginRepositories>
<pluginRepository>
<id>maven1</id>
<name>Maven.org</name>
<url>http://repo1.maven.org/maven2</url>
</pluginRepository>
</pluginRepositories>

<build>
<plugins>
<!-- Java 17 Compiler -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<release>17</release>
</configuration>
</plugin>

<!-- WAR Packaging Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.3.2</version>
</plugin>
</plugins>
</build>


</project>