diff --git a/docker-compose.yml b/docker-compose.yml index d83c12c..46862e1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -84,10 +84,13 @@ services: - NODE_OPTIONS=--max-old-space-size=2048 - HOME=/home/bitcoin - RUST_LOG=DEBUG + user: root entrypoint: > /bin/sh -lc ' + apt-get update && apt-get install -y curl git wget jq telnet npm coreutils && npm install -g wscat || echo "wscat installation failed" mkdir -p /home/bitcoin/.4nk/logs - exec /usr/local/bin/sdk_relay --config /home/bitcoin/.conf 2>&1 | tee -a /home/bitcoin/.4nk/logs/sdk_relay.log + chown -R bitcoin:bitcoin /home/bitcoin/.4nk + exec su bitcoin -c "/usr/local/bin/sdk_relay --config /home/bitcoin/.conf 2>&1 | tee -a /home/bitcoin/.4nk/logs/sdk_relay.log" ' healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8091/health"] @@ -110,6 +113,12 @@ services: depends_on: sdk_relay: condition: service_healthy + user: root + entrypoint: > + /bin/sh -lc ' + apt-get update && apt-get install -y curl git wget jq telnet npm coreutils && npm install -g wscat || echo "wscat installation failed" + exec node server.js + ' healthcheck: test: ["CMD", "sh", "-c", "curl -f http://localhost:8080/ || exit 1"] interval: 30s @@ -134,6 +143,12 @@ services: depends_on: lecoffre-back: condition: service_healthy + user: root + entrypoint: > + /bin/sh -lc ' + apt-get update && apt-get install -y curl git wget jq telnet npm coreutils && npm install -g wscat || echo "wscat installation failed" + exec npm start + ' healthcheck: test: ["CMD", "sh", "-c", "curl -f http://localhost:3000/ || exit 1"] interval: 30s @@ -160,6 +175,12 @@ services: depends_on: sdk_relay: condition: service_healthy + user: root + entrypoint: > + /bin/sh -lc ' + apt-get update && apt-get install -y curl git wget jq telnet npm coreutils && npm install -g wscat || echo "wscat installation failed" + exec npm start + ' healthcheck: test: ["CMD", "sh", "-c", "curl -f http://localhost:3003/ || exit 1"] interval: 30s @@ -179,12 +200,18 @@ services: btcnet: aliases: - sdk_signer + user: root + entrypoint: > + /bin/sh -lc ' + apk update && apk add --no-cache curl git wget jq busybox-extras npm coreutils && npm install -g wscat || echo "wscat installation failed" + exec node /app/dist/index.js + ' labels: - "com.centurylinklabs.watchtower.enable=true" restart: unless-stopped sdk_storage: - image: git.4nkweb.com/4nk/sdk_storage:latest + image: git.4nkweb.com/4nk/sdk_storage:ext container_name: sdk_storage ports: - "127.0.0.1:8081:8081"