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 |
| 5 | operations_api_oidc_client_secrets: 'operations_api/config/client_secrets_docker.json' |
| 6 | operations_api_sqlalchemy_database_uri: 'cockroachdb://oapi@cockroach-ui:26257/oapi' |
| 7 | operations_api_sqlalchemy_echo: 'false' |
| 8 | operations_api_flask_debug: 'false' |
| 9 | operations_api_bind_host: 0.0.0.0 |
| 10 | operations_api_bind_port: ${_param:haproxy_operations_api_bind_port} |
| 11 | docker_image_cockroachdb: cockroachdb/cockroach:latest |
| 12 | docker: |
| 13 | client: |
| 14 | stack: |
| 15 | operations_api: |
| 16 | service: |
| 17 | operations-api: |
| 18 | environment: |
| 19 | OAPI_OIDC_CLIENT_SECRETS: ${_param:operations_api_oidc_client_secrets} |
| 20 | OAPI_SQLALCHEMY_DATABASE_URI: ${_param:operations_api_sqlalchemy_database_uri} |
| 21 | OAPI_SQLALCHEMY_ECHO: ${_param:operations_api_sqlalchemy_echo} |
| 22 | OAPI_FLASK_DEBUG: ${_param:operations_api_flask_debug} |
| 23 | OAPI_FLASK_SECRET_KEY: ${_param:operations_api_flask_secret_key} |
| 24 | OAPI_FLASK_SERVER_HOST: ${_param:operations_api_bind_host} |
| 25 | OAPI_FLASK_SERVER_PORT: ${_param:operations_api_bind_port} |
| 26 | image: ${_param:docker_image_operations_api} |
| 27 | deploy: |
| 28 | replicas: ${_param:docker_operations_api_replicas} |
| 29 | restart_policy: |
| 30 | condition: any |
| 31 | ports: |
| 32 | - ${_param:haproxy_operations_api_exposed_port}:${_param:haproxy_operations_api_bind_port} |
| 33 | volumes: |
| 34 | - /srv/volumes/operations_api/logs/:/var/log/operations_api |
| 35 | cockroach-ui: |
| 36 | image: ${_param:docker_image_cockroachdb} |
| 37 | ports: |
| 38 | - ${_param:haproxy_cockroachdb_ui_exposed_port}:${_param:haproxy_cockroachdb_ui_bind_port} |
| 39 | command: start --insecure |
| 40 | cockroach-db-1: |
| 41 | image: cockroachdb/cockroach |
| 42 | command: start --insecure --join=cockroach-ui |
| 43 | depends_on: |
| 44 | - cockroach-ui |
| 45 | volumes: |
| 46 | - /srv/volumes/cockroachdb/cockroach-db-1:/cockroach/cockroach-data |
| 47 | cockroach-init: |
| 48 | environment: |
| 49 | COCKROACH_HOST: cockroach-ui |
| 50 | image: atengler/cockroach |
| 51 | deploy: |
| 52 | restart_policy: |
| 53 | condition: on-failure |
| 54 | depends_on: |
| 55 | - cockroach-db-1 |
| 56 | network: |
| 57 | default: |
| 58 | external: |
| 59 | name: operations_api_backend |