cyberark/conjur-api-ruby

View on GitHub
docker-compose.yml

Summary

Maintainability
Test Coverage
version: '2.1'
services:
  pg:
    image: postgres:15
    environment:
      POSTGRES_HOST_AUTH_METHOD: trust

  conjur:
    image: cyberark/conjur:edge
    # TODO: Test with a version that supports authn-sut
    command: server -a cucumber
    environment:
      DATABASE_URL: postgres://postgres@pg/postgres
      CONJUR_DATA_KEY: 'WMfApcDBtocRWV+ZSUP3Tjr5XNU+Z2FdBb6BEezejIs='
    volumes:
      - authn_local:/run/authn-local
      - ./ci/oauth/keycloak:/scripts
    depends_on:
      - pg
      - keycloak

  keycloak:
    image: jboss/keycloak:4.3.0.Final
    environment:
      - KEYCLOAK_USER=admin
      - KEYCLOAK_PASSWORD=admin
      - KEYCLOAK_APP_USER=alice
      - KEYCLOAK_APP_USER_PASSWORD=alice
      - KEYCLOAK_APP_USER_EMAIL=alice@conjur.net
      - DB_VENDOR=H2
      - KEYCLOAK_CLIENT_ID=conjurClient
      - KEYCLOAK_REDIRECT_URI=http://conjur/authn-oidc/keycloak/cucumber/authenticate
      - KEYCLOAK_CLIENT_SECRET=1234
      - KEYCLOAK_SCOPE=openid
    ports:
      - "7777:8080"
    volumes:
      - ./ci/oauth/keycloak/standalone.xml:/opt/jboss/keycloak/standalone/configuration/standalone.xml
      - ./ci/oauth/keycloak:/scripts

  tester:
    build:
        context: .
        dockerfile: Dockerfile
        args:
          RUBY_VERSION: ${RUBY_VERSION}
    volumes:
      - ./spec/reports:/src/conjur-api/spec/reports
      - ./features/reports:/src/conjur-api/features/reports
      - ./coverage:/src/conjur-api/coverage
      - authn_local:/run/authn-local
      - ./ci/oauth/keycloak:/scripts
    environment:
      CONJUR_APPLIANCE_URL: http://conjur
      CONJUR_ACCOUNT: cucumber

  dev:
    build:
      context: .
      dockerfile: Dockerfile
      args:
        RUBY_VERSION: ${RUBY_VERSION}
    entrypoint: bash
    volumes:
      - .:/src/conjur-api
      - authn_local:/run/authn-local
    environment:
      CONJUR_ACCOUNT: cucumber
    depends_on:
      - conjur

volumes:
  authn_local: