# This version of the docker-compose sets up the servers using http only for testing locally and # therefore does not require the top level apache server to configure the URLs version: '3' services: keycloak: build: context: . dockerfile: ./demo/Dockerfile.auth environment: KEYCLOAK_USER: admin KEYCLOAK_PASSWORD: admin PROXY_ADDRESS_FORWARDING: "true" JAVA_OPTS_APPEND: "-Djboss.socket.binding.port-offset=808" ports: - 8888:8888 networks: - app-network healthcheck: # test fetching public key from PORI realm test: ["CMD", "bash", "/scripts/kc_setup_keyfile.sh", "http://localhost:8888/auth", "admin", "admin", "PORI", "/keys/keycloak.key"] interval: 45s timeout: 10s retries: 5 volumes: - source: ./keys target: /keys type: bind graphkb_db: image: orientdb:3.0 environment: # customize settings below ORIENTDB_ROOT_PASSWORD: root ports: - 2424:2424 - 2480:2480 networks: - app-network volumes: - source: ./databases/orientdb/data target: /orientdb/databases type: bind - source: ./databases/orientdb/backup target: /orientdb/backup type: bind graphkb_api: image: bcgsc/pori-graphkb-api:latest ports: - 8080:8080 environment: GKB_DB_CREATE: 1 GKB_DB_HOST: graphkb_db GKB_DB_NAME: graphkb GKB_KEYCLOAK_KEY_FILE: /keys/keycloak.key KEY_PASSPHRASE: '' # customize settings below GKB_CORS_ORIGIN: '^.*$$' GKB_DBS_PASS: root GKB_KEYCLOAK_URI: http://keycloak:8888/auth/realms/PORI/protocol/openid-connect/token depends_on: - graphkb_db - keycloak networks: - app-network restart: always volumes: - source: ./keys target: /keys type: bind read_only: true healthcheck: test: ["CMD", "curl", "-f", "http://graphkb_api:8080/api/version"] interval: 30s timeout: 10s retries: 5 graphkb_client: image: bcgsc/pori-graphkb-client:latest environment: KEYCLOAK_REALM: PORI KEYCLOAK_CLIENT_ID: GraphKB # customize settings below API_BASE_URL: http://localhost:8080 KEYCLOAK_URL: http://localhost:8888/auth PUBLIC_PATH: / ports: - 5000:80 depends_on: - graphkb_api networks: - app-network restart: always ipr_db: image: bcgsc/pori-ipr-demodb:latest restart: always environment: DATABASE_NAME: ipr_demo POSTGRES_USER: postgres READONLY_USER: ipr_ro SERVICE_USER: ipr_service PGDATA: /var/lib/postgresql/data/pgdata # customize settings below POSTGRES_PASSWORD: root READONLY_PASSWORD: root SERVICE_PASSWORD: root ports: - 5432:5432 networks: - app-network healthcheck: test: ["CMD-SHELL", "pg_isready"] interval: 10s timeout: 5s retries: 5 redis: image: redis:6.2-alpine # Set health checks to wait until redis has started healthcheck: test: redis-cli ping interval: 10s timeout: 5s retries: 5 ports: # Maps port 6379 on service container to the host - 6379:6379 networks: - app-network restart: always ipr_api: image: bcgsc/pori-ipr-api:latest command: npm start ports: - 8081:8080 environment: IPR_DATABASE_HOSTNAME: ipr_db IPR_DATABASE_NAME: ipr_demo IPR_DATABASE_USERNAME: ipr_ro IPR_GRAPHKB_USERNAME: ipr_graphkb_link IPR_KEYCLOAK_KEYFILE: /keys/keycloak.key # customize settings below IPR_DATABASE_PASSWORD: root IPR_GRAPHKB_PASSWORD: ipr_graphkb_link IPR_GRAPHKB_URI: http://graphkb_api:8080/api IPR_KEYCLOAK_URI: http://keycloak:8888/auth/realms/PORI/protocol/openid-connect/token IPR_REDIS_HOST: redis IPR_REDIS_PORT: 6379 depends_on: - ipr_db - redis - keycloak networks: - app-network restart: always volumes: - source: ./keys target: /keys type: bind read_only: true healthcheck: test: ["CMD", "curl", "-f", "http://ipr_api:8080/api/spec.json"] interval: 30s timeout: 10s retries: 5 ipr_client: image: bcgsc/pori-ipr-client:latest environment: KEYCLOAK_REALM: PORI # customize settings below API_BASE_URL: http://localhost:8081/api GRAPHKB_URL: http://localhost:5000 KEYCLOAK_URL: http://localhost:8888/auth PUBLIC_PATH: / ports: - 3000:80 depends_on: - ipr_api networks: - app-network restart: always migration: image: bcgsc/pori-ipr-api:latest command: npx sequelize-cli db:migrate --url postgres://postgres:root@ipr_db:5432/ipr_demo deploy: restart_policy: condition: on-failure max_attempts: 10 depends_on: - ipr_db networks: app-network: driver: bridge