Adam Tengler | 1d4af9a | 2018-10-18 21:51:44 +0000 | [diff] [blame] | 1 | parameters: |
| 2 | _param: |
| 3 | docker_operations_api_replicas: 1 |
| 4 | docker_image_operations_api: mirantis/python-operations-api:latest |
Adam Tengler | e049e1d | 2018-10-24 22:18:56 +0000 | [diff] [blame] | 5 | operations_api_sqlalchemy_database_uri: "cockroachdb://oapi@cockroach-ui:26257/oapi" |
| 6 | operations_api_sqlalchemy_echo: "false" |
| 7 | operations_api_flask_debug: "false" |
Adam Tengler | 1d4af9a | 2018-10-18 21:51:44 +0000 | [diff] [blame] | 8 | operations_api_bind_host: 0.0.0.0 |
| 9 | operations_api_bind_port: ${_param:haproxy_operations_api_bind_port} |
| 10 | docker_image_cockroachdb: cockroachdb/cockroach:latest |
Adam Tengler | e049e1d | 2018-10-24 22:18:56 +0000 | [diff] [blame] | 11 | operations_api_keycloak_url: "http://${_param:single_address}:${_param:haproxy_keycloak_exposed_port}" |
Adam Tengler | 1d4af9a | 2018-10-18 21:51:44 +0000 | [diff] [blame] | 12 | docker: |
| 13 | client: |
| 14 | stack: |
| 15 | operations_api: |
| 16 | service: |
| 17 | operations-api: |
| 18 | environment: |
Adam Tengler | e049e1d | 2018-10-24 22:18:56 +0000 | [diff] [blame] | 19 | OAPI_OIDC_CLIENT_SECRETS_OVERRIDE: ' |
| 20 | { |
| 21 | "web": { |
| 22 | "client_id": "operations-api", |
| 23 | "client_secret": "${_param:keycloak_operations_api_client_secret}", |
| 24 | "auth_uri": "${_param:operations_api_keycloak_url}/auth/realms/drivetrain-realm/protocol/openid-connect/auth", |
| 25 | "token_uri": "${_param:operations_api_keycloak_url}/auth/realms/drivetrain-realm/protocol/openid-connect/token", |
| 26 | "token_introspection_uri": "${_param:operations_api_keycloak_url}/auth/realms/drivetrain-realm/protocol/openid-connect/token/introspect", |
| 27 | "issuer": "${_param:operations_api_keycloak_url}/auth/realms/drivetrain-realm", |
| 28 | "userinfo_uri": "${_param:operations_api_keycloak_url}/auth/realms/drivetrain-realm/protocol/openid-connect/userinfo" |
| 29 | } |
| 30 | }' |
Adam Tengler | 1d4af9a | 2018-10-18 21:51:44 +0000 | [diff] [blame] | 31 | OAPI_SQLALCHEMY_DATABASE_URI: ${_param:operations_api_sqlalchemy_database_uri} |
| 32 | OAPI_SQLALCHEMY_ECHO: ${_param:operations_api_sqlalchemy_echo} |
| 33 | OAPI_FLASK_DEBUG: ${_param:operations_api_flask_debug} |
| 34 | OAPI_FLASK_SECRET_KEY: ${_param:operations_api_flask_secret_key} |
| 35 | OAPI_FLASK_SERVER_HOST: ${_param:operations_api_bind_host} |
| 36 | OAPI_FLASK_SERVER_PORT: ${_param:operations_api_bind_port} |
| 37 | image: ${_param:docker_image_operations_api} |
| 38 | deploy: |
| 39 | replicas: ${_param:docker_operations_api_replicas} |
| 40 | restart_policy: |
| 41 | condition: any |
| 42 | ports: |
| 43 | - ${_param:haproxy_operations_api_exposed_port}:${_param:haproxy_operations_api_bind_port} |
| 44 | volumes: |
| 45 | - /srv/volumes/operations_api/logs/:/var/log/operations_api |
| 46 | cockroach-ui: |
| 47 | image: ${_param:docker_image_cockroachdb} |
| 48 | ports: |
| 49 | - ${_param:haproxy_cockroachdb_ui_exposed_port}:${_param:haproxy_cockroachdb_ui_bind_port} |
| 50 | command: start --insecure |
| 51 | cockroach-db-1: |
| 52 | image: cockroachdb/cockroach |
| 53 | command: start --insecure --join=cockroach-ui |
| 54 | depends_on: |
| 55 | - cockroach-ui |
| 56 | volumes: |
| 57 | - /srv/volumes/cockroachdb/cockroach-db-1:/cockroach/cockroach-data |
| 58 | cockroach-init: |
| 59 | environment: |
| 60 | COCKROACH_HOST: cockroach-ui |
Pavel Cizinsky | 9e76098 | 2018-10-26 15:06:16 +0200 | [diff] [blame^] | 61 | DB_NAME: oapi |
| 62 | DB_USER: oapi |
| 63 | image: atengler/cockroach-init |
Adam Tengler | 1d4af9a | 2018-10-18 21:51:44 +0000 | [diff] [blame] | 64 | deploy: |
| 65 | restart_policy: |
| 66 | condition: on-failure |
| 67 | depends_on: |
| 68 | - cockroach-db-1 |
| 69 | network: |
| 70 | default: |
| 71 | external: |
| 72 | name: operations_api_backend |