mirror of
https://github.com/valitydev/bouncer.git
synced 2024-11-06 02:15:18 +00:00
4b86d8e48f
* Make fsync repeat interval configurable as usual. * Dig into logger internals to sync w/ handler reliably * Upgrade to opa 0.26.0-debug service image in tests * Bump to rbkmoney/image-build-erlang@61a001b
42 lines
899 B
Bash
Executable File
42 lines
899 B
Bash
Executable File
#!/bin/bash
|
|
|
|
OPA_VSN="0.26.0-debug"
|
|
OPA_IMAGE="openpolicyagent/opa:${OPA_VSN}"
|
|
|
|
POLICY_DIR="/var/opa/policies"
|
|
|
|
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:
|
|
opa:
|
|
condition: service_healthy
|
|
|
|
opa:
|
|
image: ${OPA_IMAGE}
|
|
entrypoint: ["sh", "-c"]
|
|
command: ["cd ${POLICY_DIR} &&
|
|
/opa build . &&
|
|
/opa run
|
|
--server
|
|
--addr :8181
|
|
--set decision_logs.console=true
|
|
--bundle bundle.tar.gz
|
|
"]
|
|
volumes:
|
|
- ./test/policies:${POLICY_DIR}:rw
|
|
healthcheck:
|
|
test: ["CMD", "sh", "-c", "wget -q --tries=1 --spider http://localhost:8181/"]
|
|
interval: 5s
|
|
timeout: 1s
|
|
retries: 5
|
|
EOF
|