# 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 capifcore: container_name: sme-capifcore image: capifcore:v1 ports: - 8090:8090 depends_on: - keycloak entrypoint: ["/capifcore"] networks: - capif networks: capif: driver: bridge name: capifnet volumes: postgres_data: driver: local pgadmin: