<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
+ <plugin>
+ <groupId>com.google.cloud.tools</groupId>
+ <artifactId>jib-maven-plugin</artifactId>
+ </plugin>
</plugins>
</build>
<profiles>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
-
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>cps-rest</artifactId>
</dependency>
</dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>com.google.cloud.tools</groupId>
- <artifactId>jib-maven-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
</profile>
<profile>
<id>xnf-docker</id>
<artifactId>cps-nf-proxy-rest</artifactId>
</dependency>
</dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>com.google.cloud.tools</groupId>
- <artifactId>jib-maven-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
</profile>
<profile>
<id>cps-xnf-docker</id>
<artifactId>cps-nf-proxy-rest</artifactId>
</dependency>
</dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>com.google.cloud.tools</groupId>
- <artifactId>jib-maven-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
</profile>
</profiles>
</project>
\ No newline at end of file
<artifactId>cps-rest</artifactId>\r
\r
<properties>\r
- <minimum-coverage>0.53</minimum-coverage>\r
+ <minimum-coverage>0.51</minimum-coverage>\r
</properties>\r
\r
<dependencies>\r
To run the application locally using `docker-compose`, execute following command from this `docker-compose` folder:
-Generate the containers
+Compile without generating the docker images
+
+```bash
+mvn clean install -Pcps-docker -Pxnf-docker -Pcps-xnf-docker -Djib.skip
+```
+
+Generate the docker images
```bash
mvn clean install -Pcps-docker -Pxnf-docker -Pcps-xnf-docker
```
-or for generate an specific type
+
+for generate a specific type of docker images
```bash
mvn clean install -Pcps-docker
```
+
Run the containers
```bash
VERSION=0.0.1-SNAPSHOT DB_HOST=dbpostgresql DB_USERNAME=cps DB_PASSWORD=cps docker-compose up -d
-```
\ No newline at end of file
+```
+
+Run application from Intellj IDE
+
+you need first to enable the maven profile desired under tab Maven
+then go to Run -> Edit configurations
+ 1- Working directory -> select docker-compose folder e.g. ~/workspace/onap/cps/docker-compose/
+ 2- Enviroment variables -> add variables configuration e.g. DB_HOST=127.0.0.1;DB_USERNAME=cps;DB_PASSWORD=cps
\ No newline at end of file
cps:
container_name: cps-service
image: nexus3.onap.org:10001/onap/cps-service:${VERSION}
+ volumes:
+ - "./application.yml:/app/application.yml"
ports:
- "8881:8080"
environment:
depends_on:
- dbpostgresql
+ cps-nf-proxy:
+ container_name: cps-nf-proxy
+ image: nexus3.onap.org:10001/onap/cps-nf-proxy:${VERSION}
+ volumes:
+ - "./application.yml:/app/application.yml"
+ ports:
+ - "8882:8080"
+ environment:
+ DB_HOST: ${DB_HOST}
+ DB_USERNAME: ${DB_USERNAME}
+ DB_PASSWORD: ${DB_PASSWORD}
+ restart: unless-stopped
+ depends_on:
+ - dbpostgresql
+
+ cps-and-nf-proxy:
+ container_name: cps-and-nf-proxy
+ image: nexus3.onap.org:10001/onap/cps-and-nf-proxy:${VERSION}
+ volumes:
+ - "./application.yml:/app/application.yml"
+ ports:
+ - "8883:8080"
+ environment:
+ DB_HOST: ${DB_HOST}
+ DB_USERNAME: ${DB_USERNAME}
+ DB_PASSWORD: ${DB_PASSWORD}
+ restart: unless-stopped
+ depends_on:
+ - dbpostgresql
dbpostgresql:
container_name: dbpostgresql