wapi-lib/docker-compose.sh

129 lines
3.5 KiB
Bash
Executable File

#!/bin/bash
cat <<EOF
version: '2.1'
services:
${SERVICE_NAME}:
image: ${BUILD_IMAGE}
volumes:
- .:$PWD
- $HOME/.cache:/home/$UNAME/.cache
working_dir: $PWD
command: |
bash -c '{
woorl -s _checkouts/dmsl/proto/cds.thrift http://cds:8022/v1/keyring Keyring Init 1 1 || true;
exec /sbin/init
}'
depends_on:
hellgate:
condition: service_healthy
identification:
condition: service_healthy
cds:
condition: service_healthy
dominant:
condition: service_healthy
machinegun:
condition: service_healthy
hellgate:
image: dr.rbkmoney.com/rbkmoney/hellgate:88abe5c9c3febf567e7269e81b2b808c01500b43
command: /opt/hellgate/bin/hellgate foreground
depends_on:
machinegun:
condition: service_healthy
dominant:
condition: service_healthy
shumway:
condition: service_healthy
volumes:
- ./test/hellgate/sys.config:/opt/hellgate/releases/0.1/sys.config
- ./test/log/hellgate:/var/log/hellgate
healthcheck:
test: "curl http://localhost:8022/"
interval: 5s
timeout: 1s
retries: 10
dominant:
image: dr.rbkmoney.com/rbkmoney/dominant:1756bbac6999fa46fbe44a72c74c02e616eda0f6
command: /opt/dominant/bin/dominant foreground
depends_on:
machinegun:
condition: service_healthy
volumes:
- ./test/dominant/sys.config:/opt/dominant/releases/0.1/sys.config
- ./test/log/dominant:/var/log/dominant
healthcheck:
test: "curl http://localhost:8022/"
interval: 5s
timeout: 1s
retries: 10
shumway:
image: dr.rbkmoney.com/rbkmoney/shumway:7a5f95ee1e8baa42fdee9c08cc0ae96cd7187d55
restart: always
entrypoint:
- java
- -Xmx512m
- -jar
- /opt/shumway/shumway.jar
- --spring.datasource.url=jdbc:postgresql://shumway-db:5432/shumway
- --spring.datasource.username=postgres
- --spring.datasource.password=postgres
depends_on:
- shumway-db
healthcheck:
test: "curl http://localhost:8022/"
interval: 5s
timeout: 1s
retries: 10
identification:
image: dr.rbkmoney.com/rbkmoney/identification:228727f0a0e7eb8874977921d340fd56e6b5d472
command: /opt/identification/bin/identification foreground
volumes:
- ./test/identification/sys.config:/opt/identification/releases/0.1/sys.config
- ./test/log/identification:/var/log/identification
depends_on:
- cds
healthcheck:
test: "curl http://localhost:8022/"
interval: 5s
timeout: 1s
retries: 10
cds:
image: dr.rbkmoney.com/rbkmoney/cds:a02376ae8a30163a6177d41edec9d8ce2ff85e4f
command: /opt/cds/bin/cds foreground
volumes:
- ./test/cds/sys.config:/opt/cds/releases/0.1.0/sys.config
- ./test/log/cds:/var/log/cds
healthcheck:
test: "curl http://localhost:8022/"
interval: 5s
timeout: 1s
retries: 10
machinegun:
image: dr.rbkmoney.com/rbkmoney/machinegun:5756aa3070f9beebd4b20d7076c8cdc079286090
command: /opt/machinegun/bin/machinegun foreground
volumes:
- ./test/machinegun/config.yaml:/opt/machinegun/etc/config.yaml
- ./test/log/machinegun:/var/log/machinegun
healthcheck:
test: "curl http://localhost:8022/"
interval: 5s
timeout: 1s
retries: 10
shumway-db:
image: dr.rbkmoney.com/rbkmoney/postgres:9.6
environment:
- POSTGRES_DB=shumway
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- SERVICE_NAME=shumway-db
EOF