lecoffre_node/docker-compose.yml

267 lines
6.9 KiB
YAML

services:
tor:
image: btcpayserver/tor:0.4.8.10
container_name: tor-proxy
networks:
btcnet:
aliases:
- tor
restart: unless-stopped
bitcoin:
image: git.4nkweb.com/4nk/bitcoin:latest
container_name: bitcoin-signet
depends_on:
- tor
volumes:
- bitcoin_data:/home/bitcoin/.bitcoin
- ./bitcoin/bitcoin.conf:/etc/bitcoin/bitcoin.conf:ro
networks:
btcnet:
aliases:
- bitcoin
user: root
entrypoint: >
/bin/sh -c "
chown -R bitcoin:bitcoin /home/bitcoin/.bitcoin || echo 'warn: chown partiel (fichiers bind-mount Windows)';
exec su-exec bitcoin bitcoind -conf=/etc/bitcoin/bitcoin.conf -signet"
healthcheck:
test: ["CMD", "bitcoin-cli", "-conf=/etc/bitcoin/bitcoin.conf", "getblockchaininfo"]
interval: 30s
timeout: 10s
retries: 3
restart: unless-stopped
blindbit:
image: git.4nkweb.com/4nk/blindbit-oracle:dev
container_name: blindbit-oracle
depends_on:
bitcoin:
condition: service_healthy
volumes:
- blindbit_data:/root/.blindbit-oracle
- ./blindbit/blindbit.toml:/tmp/blindbit.toml:ro
- bitcoin_data:/home/bitcoin/.bitcoin
entrypoint: >
sh -c "cp /tmp/blindbit.toml /root/.blindbit-oracle/blindbit.toml &&
./main -datadir /root/.blindbit-oracle"
networks:
btcnet:
aliases:
- blindbit
ports:
- "127.0.0.1:8000:8000"
healthcheck:
test: ["CMD-SHELL", "code=$(curl -s -o /dev/null -w '%{http_code}' http://localhost:8000/tweaks/1); [ \"$$code\" != \"000\" ]"]
interval: 15s
timeout: 5s
retries: 10
restart: unless-stopped
sdk_relay:
image: git.4nkweb.com/4nk/sdk_relay:ext
container_name: sdk_relay
depends_on:
blindbit:
condition: service_healthy
volumes:
- ./relay/sdk_relay.conf:/home/bitcoin/.conf:ro
- sdk_data:/home/bitcoin/.4nk
- bitcoin_data:/home/bitcoin/.bitcoin
ports:
- "127.0.0.1:8090:8090"
- "127.0.0.1:8091:8091"
networks:
btcnet:
aliases:
- sdk_relay
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
environment:
- 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
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"]
interval: 30s
timeout: 10s
retries: 3
restart: unless-stopped
lecoffre-back:
image: git.4nkweb.com/4nk/lecoffre-back-mini:ext
container_name: lecoffre-back
env_file:
- .env
ports:
- "127.0.0.1:8080:8080"
networks:
btcnet:
aliases:
- lecoffre-back
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
timeout: 10s
retries: 5
start_period: 60s
labels:
- "com.centurylinklabs.watchtower.enable=true"
restart: unless-stopped
lecoffre-front:
image: git.4nkweb.com/4nk/lecoffre-front:ext
container_name: lecoffre-front
env_file:
- .env
ports:
- "127.0.0.2:3004:3000"
networks:
btcnet:
aliases:
- lecoffre-front
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
timeout: 10s
retries: 3
start_period: 30s
labels:
- "com.centurylinklabs.watchtower.enable=true"
restart: unless-stopped
ihm_client:
image: git.4nkweb.com/4nk/ihm_client:ext
container_name: ihm_client
env_file:
- .env
environment:
- VITE_BOOTSTRAPURL=ws://sdk_relay:8090/
ports:
- "127.0.0.1:3003:3003"
networks:
btcnet:
aliases:
- ihm_client
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
timeout: 10s
retries: 3
start_period: 30s
labels:
- "com.centurylinklabs.watchtower.enable=true"
restart: unless-stopped
sdk_signer:
image: git.4nkweb.com/4nk/sdk_signer:latest
container_name: sdk_signer
ports:
- "127.0.0.1:3001:3001"
networks:
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:ext
container_name: sdk_storage
ports:
- "127.0.0.1:8081:8081"
networks:
btcnet:
aliases:
- sdk_storage
labels:
- "com.centurylinklabs.watchtower.enable=true"
restart: unless-stopped
watchtower:
image: containrrr/watchtower
container_name: watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command: --interval 30 --label-enable
networks:
- btcnet
restart: unless-stopped
signet_miner:
build:
context: ./miner
container_name: signet_miner
depends_on:
bitcoin:
condition: service_healthy
env_file:
- ./miner/.env
volumes:
- bitcoin_data:/bitcoin:ro
networks:
btcnet:
aliases:
- signet_miner
profiles: ["miner"]
restart: unless-stopped
volumes:
bitcoin_data:
name: 4nk_node_bitcoin_data
blindbit_data:
sdk_data:
networks:
btcnet:
name: 4nk_node_btcnet
driver: bridge
ipam:
config:
- subnet: 172.20.0.0/16