|
| 1 | + |
| 2 | +# author : oussama.hafsi@pwc.com |
| 3 | + |
| 4 | +version: "3.7" |
| 5 | + |
| 6 | +services: |
| 7 | + |
| 8 | + pgadmin: |
| 9 | + image: dpage/pgadmin4 |
| 10 | + container_name: pgadmin |
| 11 | + environment: |
| 12 | + PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:-oussama.hafsi@pwc.com} |
| 13 | + PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-admin} |
| 14 | + PGADMIN_CONFIG_CONSOLE_LOG_LEVEL: 10 |
| 15 | + ports: |
| 16 | + - "${PGADMIN_PORT:-5050}:80" |
| 17 | + restart: unless-stopped |
| 18 | + volumes: |
| 19 | + - pgadmin:/var/lib/pgadmin |
| 20 | + |
| 21 | + postgres: |
| 22 | + image: postgres:14 |
| 23 | + container_name: postgres |
| 24 | + user: postgres |
| 25 | + healthcheck: |
| 26 | + test: ["CMD-SHELL", "pg_isready"] |
| 27 | + interval: 10s |
| 28 | + timeout: 5s |
| 29 | + retries: 5 |
| 30 | + ports: |
| 31 | + - "5432:5432" |
| 32 | + volumes: |
| 33 | + - keycloak-datastore:/var/lib/postresql/data |
| 34 | + - ./init-databases.sh:/docker-entrypoint-initdb.d/init-databases.sh |
| 35 | + environment: |
| 36 | + POSTGRES_MULTIPLE_DATABASES: keycloakdb,apicuriodb,registrydb |
| 37 | + POSTGRES_USER: postgres |
| 38 | + POSTGRES_PASSWORD: postgres |
| 39 | + |
| 40 | + keycloak: |
| 41 | + image: jboss/keycloak:15.0.2 |
| 42 | + container_name: keycloak |
| 43 | + healthcheck: |
| 44 | + test: ["CMD", "curl", "-f", "http://localhost:8080/auth/realms/master"] |
| 45 | + interval: 10s |
| 46 | + timeout: 5s |
| 47 | + retries: 5 |
| 48 | + depends_on: |
| 49 | + - postgres |
| 50 | + ports: |
| 51 | + - "8090:8080" |
| 52 | + volumes: |
| 53 | + - ./realms:/opt/jboss/keycloak/realm-config |
| 54 | + environment: |
| 55 | + KEYCLOAK_IMPORT: /opt/jboss/keycloak/realm-config/apicurio-realm.json,/opt/jboss/keycloak/realm-config/microcks-realm.json |
| 56 | + DB_VENDOR: POSTGRES |
| 57 | + DB_ADDR: postgres |
| 58 | + DB_PORT: 5432 |
| 59 | + DB_DATABASE: keycloakdb |
| 60 | + DB_USER: keycloakdb |
| 61 | + DB_PASSWORD: keycloakdb |
| 62 | + KEYCLOAK_USER: ${KEYCLOAK_USER:-admin} |
| 63 | + KEYCLOAK_PASSWORD: ${KEYCLOAK_PASSWORD:-admin} |
| 64 | + |
| 65 | + apicurio-ws: |
| 66 | + image: 'apicurio/apicurio-studio-ws:${APICURIO_WS_VERSION:-0.2.51.Final}' |
| 67 | + container_name: apicurio-ws |
| 68 | + depends_on: [postgres, keycloak] |
| 69 | + healthcheck: |
| 70 | + test: ["CMD", "curl", "-f", "http://localhost:8080/favicon.ico","--output","binary"] |
| 71 | + interval: 10s |
| 72 | + timeout: 5s |
| 73 | + retries: 5 |
| 74 | + ports: |
| 75 | + - '8092:8080' |
| 76 | + environment: |
| 77 | + JAVA_TOOL_OPTIONS: '-Djava.net.preferIPv4Stack=true' |
| 78 | + |
| 79 | + APICURIO_HUB_STORAGE_JDBC_TYPE: postgresql9 |
| 80 | + APICURIO_DB_DRIVER_NAME: postgresql |
| 81 | + APICURIO_DB_CONNECTION_URL: jdbc:postgresql://postgres:5432/apicuriodb |
| 82 | + APICURIO_DB_USER_NAME: apicuriodb |
| 83 | + APICURIO_DB_PASSWORD: apicuriodb |
| 84 | + APICURIO_DB_INITIALIZE: "true" |
| 85 | + APICURIO_SHARE_FOR_EVERYONE: "false" |
| 86 | + |
| 87 | + apicurio-api: |
| 88 | + image: 'apicurio/apicurio-studio-api:${APICURIO_API_VERSION:-0.2.51.Final}' |
| 89 | + container_name: apicurio-api |
| 90 | + depends_on: [postgres, apicurio-ws,keycloak] |
| 91 | + ports: |
| 92 | + - '8091:8080' |
| 93 | + environment: |
| 94 | + JAVA_TOOL_OPTIONS: '-Djava.net.preferIPv4Stack=true' |
| 95 | + |
| 96 | + APICURIO_KC_AUTH_URL: http://$HOST:8090/auth |
| 97 | + APICURIO_KC_CLIENT_ID: apicurio-api |
| 98 | + APICURIO_KC_REALM: apicurio |
| 99 | + |
| 100 | + APICURIO_HUB_STORAGE_JDBC_TYPE: postgresql9 |
| 101 | + APICURIO_DB_DRIVER_NAME: postgresql |
| 102 | + APICURIO_DB_CONNECTION_URL: jdbc:postgresql://postgres:5432/apicuriodb |
| 103 | + APICURIO_DB_USER_NAME: apicuriodb |
| 104 | + APICURIO_DB_PASSWORD: apicuriodb |
| 105 | + APICURIO_DB_INITIALIZE: "true" |
| 106 | + |
| 107 | + APICURIO_MICROCKS_API_URL: http://$HOST:8900/api |
| 108 | + APICURIO_MICROCKS_CLIENT_ID: microcks-serviceaccount |
| 109 | + APICURIO_MICROCKS_CLIENT_SECRET: ab54d329-e435-41ae-a900-ec6b3fe15c54 |
| 110 | + |
| 111 | + apicurio-ui: |
| 112 | + image: 'apicurio/apicurio-studio-ui:${APICURIO_UI_VERSION:-0.2.51.Final}' |
| 113 | + container_name: apicurio-ui |
| 114 | + depends_on: [postgres, apicurio-api, apicurio-ws, keycloak] |
| 115 | + ports: |
| 116 | + - '8093:8080' |
| 117 | + environment: |
| 118 | + JAVA_TOOL_OPTIONS: '-Djava.net.preferIPv4Stack=true' |
| 119 | + |
| 120 | + APICURIO_KC_CLIENT_ID: apicurio-studio |
| 121 | + APICURIO_KC_AUTH_URL: http://$HOST:8090/auth |
| 122 | + APICURIO_KC_REALM: apicurio |
| 123 | + |
| 124 | + APICURIO_UI_HUB_API_URL: http://$HOST:8091 |
| 125 | + APICURIO_UI_EDITING_URL: ws://$HOST:8092 |
| 126 | + APICURIO_UI_FEATURE_MICROCKS: "true" |
| 127 | + APICURIO_UI_FEATURE_SHARE_WITH_EVERYONE: "false" |
| 128 | + APICURIO_UI_LOGOUT_REDIRECT_URI: / |
| 129 | + |
| 130 | + mongo: |
| 131 | + image: mongo:3.4.23 |
| 132 | + container_name: microcks-mongo |
| 133 | + healthcheck: |
| 134 | + test: echo 'db.runCommand("ping").ok' | mongo mongo:27017/test --quiet |
| 135 | + interval: 10s |
| 136 | + timeout: 10s |
| 137 | + retries: 5 |
| 138 | + start_period: 15s |
| 139 | + volumes: |
| 140 | + - mongo_data:/data/db |
| 141 | + |
| 142 | + postman: |
| 143 | + image: microcks/microcks-postman-runtime:latest |
| 144 | + container_name: microcks-postman-runtime |
| 145 | + |
| 146 | + microcks: |
| 147 | + depends_on: [mongo, postman, keycloak] |
| 148 | + image: microcks/microcks:1.4.1-fix-2 |
| 149 | + healthcheck: |
| 150 | + test: ["CMD", "curl", "-f", "http://localhost:8080"] |
| 151 | + interval: 10s |
| 152 | + timeout: 10s |
| 153 | + retries: 5 |
| 154 | + start_period: 40s |
| 155 | + container_name: microcks |
| 156 | + ports: |
| 157 | + - "8900:8080" |
| 158 | + environment: |
| 159 | + SPRING_PROFILES_ACTIVE: prod |
| 160 | + SPRING_DATA_MONGODB_URI: mongodb://mongo:27017 |
| 161 | + SPRING_DATA_MONGODB_DATABASE: microcks |
| 162 | + POSTMAN_RUNNER_URL: http://postman:3000 |
| 163 | + TEST_CALLBACK_URL: http://$HOST:8090 |
| 164 | + KEYCLOAK_URL: http://$HOST:8090/auth |
| 165 | + |
| 166 | + |
| 167 | + |
| 168 | + apicurio-registry: |
| 169 | + depends_on: [postgres] |
| 170 | + image: apicurio/apicurio-registry-sql:2.0.2.Final |
| 171 | + container_name: apicurio-registry |
| 172 | + ports: |
| 173 | + - 8094:8080 |
| 174 | + environment: |
| 175 | + REGISTRY_DATASOURCE_URL: 'jdbc:postgresql://postgres:5432/registrydb' |
| 176 | + REGISTRY_DATASOURCE_USERNAME: registrydb |
| 177 | + REGISTRY_DATASOURCE_PASSWORD: registrydb |
| 178 | + |
| 179 | +volumes: |
| 180 | + keycloak-datastore: |
| 181 | + pgadmin: |
| 182 | + mongo_data: |
0 commit comments