wapi-lib/docker-compose.sh
2018-06-20 20:25:12 +03:00

95 lines
2.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: /sbin/init
depends_on:
hellgate:
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: 20
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: 20
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: 20
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: 20
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