X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=capifcore%2Fdocker-compose.yml;fp=capifcore%2Fdocker-compose.yml;h=da2be5b9c8294845e2b53897eea2037d4870ad51;hb=b01ea504c8924bbf86355d6a888b767e6af853c0;hp=0000000000000000000000000000000000000000;hpb=051a4a32068b4718ef9ddb1868e532a976de843e;p=nonrtric%2Fplt%2Fsme.git diff --git a/capifcore/docker-compose.yml b/capifcore/docker-compose.yml new file mode 100644 index 0000000..da2be5b --- /dev/null +++ b/capifcore/docker-compose.yml @@ -0,0 +1,84 @@ +# Copyright (C) 2023 Nordix Foundation. All rights reserved. +# ======================================================================== +# 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. +# ============LICENSE_END================================================= +# +version: '3.5' + +services: + postgres: + container_name: postgres_container + image: postgres:latest + environment: + POSTGRES_DB: keycloak + POSTGRES_USER: keycloak + POSTGRES_PASSWORD: password + volumes: + - postgres_data:/var/lib/postgresql/data + healthcheck: + test: "exit 0" + ports: + - "5432:5432" + networks: + - capif + restart: unless-stopped + + pgadmin: + container_name: pgadmin_container + image: dpage/pgadmin4 + environment: + PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:-pgadmin4@pgadmin.org} + PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-admin} + PGADMIN_CONFIG_SERVER_MODE: 'False' + volumes: + - pgadmin:/var/lib/pgadmin + + ports: + - "${PGADMIN_PORT:-5050}:80" + networks: + - capif + restart: unless-stopped + + keycloak: + container_name: keycloak + image: quay.io/keycloak/keycloak:20.0.3 + environment: + KC_DB: postgres + KC_DB_URL_HOST: postgres_container + KC_DB_URL_DATABASE: keycloak + KC_DB_PASSWORD: password + KC_DB_USERNAME: keycloak + KC_DB_SCHEMA: public + KEYCLOAK_ADMIN: admin + KEYCLOAK_ADMIN_PASSWORD: secret + ports: + - 8080:8080 + depends_on: + - postgres + healthcheck: + test: curl --fail --silent http://localhost:8180/health/ready 2>&1 || exit 1 + interval: 10s + timeout: 10s + retries: 5 + entrypoint: ["/opt/keycloak/bin/kc.sh", "start-dev"] + networks: + - capif + +networks: + capif: + driver: bridge + +volumes: + postgres_data: + driver: local + pgadmin: \ No newline at end of file