diff options
Diffstat (limited to 'docker-compose')
-rw-r--r-- | docker-compose/README.md | 27 | ||||
-rwxr-xr-x | docker-compose/docker-compose.yml | 22 |
2 files changed, 35 insertions, 14 deletions
diff --git a/docker-compose/README.md b/docker-compose/README.md index 6fa222908c..c172276ebe 100644 --- a/docker-compose/README.md +++ b/docker-compose/README.md @@ -1,9 +1,30 @@ +<!-- + ============LICENSE_START======================================================= + Copyright (C) 2020 Pantheon.tech + Modifications (C) 2020-2021 Nordix Foundation. + ================================================================================ + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + SPDX-License-Identifier: Apache-2.0 + ============LICENSE_END========================================================= +--> + # Building and running CPS locally ## Building Java Archive only Following command builds all Java components to `cps-application/target/cps-application-x.y.z-SNAPSHOT.jar` JAR file -without generating any docker images: +without generating any docker images: ```bash mvn clean install -Pcps-docker -Pncmp-docker -Pcps-ncmp-docker -Djib.skip @@ -14,14 +35,14 @@ mvn clean install -Pcps-docker -Pncmp-docker -Pcps-ncmp-docker -Djib.skip * Following command builds the JAR file and also generates the Docker image for all CPS components: ```bash -mvn clean install -Pcps-docker -Pncmp-docker -Pcps-ncmp-docker -Ddocker.repository.push= +mvn clean install -Pcps-docker -Pncmp-docker -Pcps-ncmp-docker ``` * Following command builds the JAR file and generates the Docker image for specified CPS component: (with `<docker-profile>` being one of `cps-docker`, `ncmp-docker` or `cps-ncmp-docker`): ```bash -mvn clean install -P<docker-profile> -Ddocker.repository.push= +mvn clean install -P<docker-profile> ``` ## Running Docker containers diff --git a/docker-compose/docker-compose.yml b/docker-compose/docker-compose.yml index f01d12da28..2878462a36 100755 --- a/docker-compose/docker-compose.yml +++ b/docker-compose/docker-compose.yml @@ -21,45 +21,45 @@ version: "3.7" services: #cps-standalone: # container_name: cps-service - # image: onap/cps-service:${VERSION:-latest} + # image: ${DOCKER_REPO:-nexus3.onap.org:10003}/onap/cps-service:${VERSION:-latest} # ports: # - "8881:8080" # environment: # CPS_USERNAME: ${CPS_USERNAME:-cpsuser} # CPS_PASSWORD: ${CPS_PASSWORD:-cpsr0cks!} # DB_HOST: dbpostgresql - # DB_USERNAME: ${DB_USERNAME} - # DB_PASSWORD: ${DB_PASSWORD} + # DB_USERNAME: ${DB_USERNAME:-cps} + # DB_PASSWORD: ${DB_PASSWORD:-cps} # restart: unless-stopped # depends_on: # - dbpostgresql #ncmp-standalone: # container_name: cps-ncmp - # image: onap/cps-ncmp:${VERSION:-latest} + # image: ${DOCKER_REPO:-nexus3.onap.org:10003}/onap/cps-ncmp:${VERSION:-latest} # ports: # - "8882:8080" # environment: # CPS_USERNAME: ${CPS_USERNAME:-cpsuser} # CPS_PASSWORD: ${CPS_PASSWORD:-cpsr0cks!} # DB_HOST: dbpostgresql - # DB_USERNAME: ${DB_USERNAME} - # DB_PASSWORD: ${DB_PASSWORD} + # DB_USERNAME: ${DB_USERNAME:-cps} + # DB_PASSWORD: ${DB_PASSWORD:-cps} # restart: unless-stopped # depends_on: # - dbpostgresql cps-and-ncmp: container_name: cps-and-ncmp - image: onap/cps-and-ncmp:${VERSION:-latest} + image: ${DOCKER_REPO:-nexus3.onap.org:10003}/onap/cps-and-ncmp:${VERSION:-latest} ports: - "8883:8080" environment: CPS_USERNAME: ${CPS_USERNAME:-cpsuser} CPS_PASSWORD: ${CPS_PASSWORD:-cpsr0cks!} DB_HOST: dbpostgresql - DB_USERNAME: ${DB_USERNAME} - DB_PASSWORD: ${DB_PASSWORD} + DB_USERNAME: ${DB_USERNAME:-cps} + DB_PASSWORD: ${DB_PASSWORD:-cps} restart: unless-stopped depends_on: - dbpostgresql @@ -71,5 +71,5 @@ services: - '5432:5432' environment: POSTGRES_DB: cpsdb - POSTGRES_USER: ${DB_USERNAME} - POSTGRES_PASSWORD: ${DB_PASSWORD} + POSTGRES_USER: ${DB_USERNAME:-cps} + POSTGRES_PASSWORD: ${DB_PASSWORD:-cps} |