Docker image building and docker-compose for cps-nf-proxy 97/117097/4
authorRuslan Kashapov <ruslan.kashapov@pantheon.tech>
Fri, 22 Jan 2021 10:53:01 +0000 (12:53 +0200)
committerRuslan Kashapov <ruslan.kashapov@pantheon.tech>
Tue, 26 Jan 2021 12:01:53 +0000 (14:01 +0200)
Issue-ID: CPS-184
Change-Id: I364a7f1ff41ca491f522038269d95d91b76da313
Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
cps-nf-proxy-rest/pom.xml
docker-compose/docker-compose.yml

index 23adb93..7b56014 100755 (executable)
@@ -12,6 +12,8 @@
     <artifactId>cps-nf-proxy-rest</artifactId>
 
     <properties>
+        <app>org.onap.cps.nfproxy.Application</app>
+        <repository.name>nexus3.onap.org:10001/onap/cps-nf-proxy</repository.name>
         <minimum-coverage>0.44</minimum-coverage>
     </properties>
 
             </plugin>
         </plugins>
     </build>
+
+    <profiles>
+        <profile>
+            <id>docker</id>
+            <activation>
+                <activeByDefault>false</activeByDefault>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>com.google.cloud.tools</groupId>
+                        <artifactId>jib-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <phase>package</phase>
+                                <id>build</id>
+                                <goals>
+                                    <goal>dockerBuild</goal>
+                                </goals>
+                            </execution>
+                            <execution>
+                                <phase>deploy</phase>
+                                <id>buildAndPush</id>
+                                <goals>
+                                    <goal>build</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
 </project>
index b1b3bf9..391d911 100644 (file)
@@ -14,6 +14,19 @@ services:
     depends_on:
       - dbpostgresql
 
+  cps-nf-proxy:
+    container_name: cps-nf-proxy
+    image: nexus3.onap.org:10001/onap/cps-nf-proxy:${VERSION}
+    ports:
+      - "8081:8080"
+    environment:
+      DB_HOST: ${DB_HOST}
+      DB_USERNAME: ${DB_USERNAME}
+      DB_PASSWORD: ${DB_PASSWORD}
+    restart: unless-stopped
+    depends_on:
+      - dbpostgresql
+
   dbpostgresql:
     container_name: dbpostgresql
     image: postgres