umbrel-apps/samourai-server/docker-compose.yml
2022-05-01 01:49:07 +02:00

141 lines
4.8 KiB
YAML

version: "3.7"
services:
db:
image: louneskmt/dojo-db:1.5.0-low-mem@sha256:e82c23699196bcaf37fe021ca47eef1c53d18ba8a10290ae8dcfe7cb24dbb5e6
init: true
restart: on-failure
stop_grace_period: 5m
user: "1000:1000"
environment:
MYSQL_DATABASE: samourai-main
MYSQL_ROOT_PASSWORD: rootpassword
MYSQL_USER: samourai
MYSQL_PASSWORD: password
volumes:
- ${APP_DATA_DIR}/mysql/data:/var/lib/mysql
networks:
default:
ipv4_address: $APP_SAMOURAI_SERVER_DB_IP
node:
image: louneskmt/dojo-nodejs:1.15.0@sha256:84be2d82bb51c7702e1ea0630a7dd206ed6284dc4061c0e6e213b58fad361ef2
init: true
restart: on-failure
command: "/home/node/app/wait-for-it.sh ${APP_SAMOURAI_SERVER_DB_IP}:3306 --timeout=720 --strict -- /home/node/app/restart.sh"
user: "1000:1000"
environment:
# GLOBAL
COMMON_BTC_NETWORK: $BITCOIN_NETWORK
DOJO_VERSION_TAG: 1.15.0
NET_DOJO_TOR_IPV4: $TOR_PROXY_IP
TOR_SOCKS_PORT: $TOR_PROXY_PORT
NET_DOJO_MYSQL_IPV4: $APP_SAMOURAI_SERVER_DB_IP
# MYSQL
MYSQL_DATABASE: samourai-main
MYSQL_USER: samourai
MYSQL_PASSWORD: password
# NODEJS
NODE_GAP_EXTERNAL: 100
NODE_GAP_INTERNAL: 100
NODE_ADDR_FILTER_THRESHOLD: 1000
NODE_ADDR_DERIVATION_MIN_CHILD: 2
NODE_ADDR_DERIVATION_MAX_CHILD: 2
NODE_ADDR_DERIVATION_THRESHOLD: 10
NODE_TXS_SCHED_MAX_ENTRIES: 10
NODE_TXS_SCHED_MAX_DELTA_HEIGHT: 18
NODE_JWT_ACCESS_EXPIRES: 900
NODE_JWT_REFRESH_EXPIRES: 7200
NODE_PREFIX_STATUS: status
NODE_PREFIX_SUPPORT: support
NODE_PREFIX_STATUS_PUSHTX: status
NODE_TRACKER_MEMPOOL_PERIOD: 10000
NODE_TRACKER_UNCONF_TXS_PERIOD: 300000
NODE_ACTIVE_INDEXER: local_indexer
NODE_FEE_TYPE: ECONOMICAL
# SECURITY
NODE_API_KEY: $SAMOURAI_SERVER_NODE_API_KEY
NODE_ADMIN_KEY: $SAMOURAI_SERVER_NODE_ADMIN_KEY
NODE_JWT_SECRET: $SAMOURAI_SERVER_NODE_JWT_SECRET
# BITCOIN
BITCOIND_IP: $BITCOIN_IP
BITCOIND_RPC_PORT: $BITCOIN_RPC_PORT
BITCOIND_RPC_USER: $BITCOIN_RPC_USER
BITCOIND_RPC_PASSWORD: $BITCOIN_RPC_PASS
BITCOIND_ZMQ_RAWTXS: $BITCOIN_ZMQ_RAWTX_PORT
BITCOIND_ZMQ_BLK_HASH: $BITCOIN_ZMQ_HASHBLOCK_PORT
# EXPLORER
EXPLORER_INSTALL: "off"
# INDEXER
INDEXER_IP: $ELECTRUM_IP
INDEXER_RPC_PORT: $ELECTRUM_PORT
INDEXER_PROTOCOL: tcp
INDEXER_BATCH_SUPPORT: inactive # 'active' for ElectrumX, 'inactive' otherwise
depends_on:
- db
networks:
default:
ipv4_address: $APP_SAMOURAI_SERVER_NODE_IP
whirlpool:
image: louneskmt/whirlpool:0.10.13@sha256:f978fde6b200cddabd42f2a1fcfaad0271e05c30409bb128bfc57935ef32976a
init: true
restart: on-failure
user: "1000:1000"
command:
- "--listen"
- "--cli.apiKey=$SAMOURAI_SERVER_WHIRLPOOL_API_KEY"
- "--cli.api.http-enable=true"
- "--cli.api.http-port=$APP_SAMOURAI_SERVER_WHIRLPOOL_PORT"
- "--cli.tor=true"
- "--cli.torConfig.coordinator.enabled=true"
- "--cli.torConfig.coordinator.onion=true"
- "--cli.torConfig.backend.enabled=false"
- "--cli.torConfig.backend.onion=false"
- "--cli.mix.liquidityClient=true"
- "--cli.mix.clientsPerPool=1"
- "--resync"
environment:
WHIRLPOOL_BITCOIN_NETWORK: $BITCOIN_NETWORK
WHIRLPOOL_DOJO: "on"
WHIRLPOOL_DOJO_IP: $APP_SAMOURAI_SERVER_IP
volumes:
- ${APP_DATA_DIR}/whirlpool:/home/whirlpool/.whirlpool-cli
networks:
default:
ipv4_address: $APP_SAMOURAI_SERVER_WHIRLPOOL_IP
nginx:
image: nginx:1.21-alpine@sha256:686aac2769fd6e7bab67663fd38750c135b72d993d0bb0a942ab02ef647fc9c3
init: true
restart: on-failure
command: /bin/sh -c "envsubst < /var/www/connect/js/conf.template.js > /var/www/connect/js/conf.js && /wait-for node:8080 --timeout=720 -- nginx"
volumes:
- ${APP_DATA_DIR}/nginx/wait-for:/wait-for
- ${APP_DATA_DIR}/nginx/nginx.conf:/etc/nginx/nginx.conf
- ${APP_DATA_DIR}/nginx/${BITCOIN_NETWORK}.conf:/etc/nginx/sites-enabled/dojo.conf
- ${APP_DATA_DIR}/nginx/connect.conf:/etc/nginx/sites-enabled/connect.conf
- ${APP_DATA_DIR}/nginx/connect:/var/www/connect
environment:
COMMON_BTC_NETWORK: $BITCOIN_NETWORK
DOJO_LOCAL_PORT: $APP_SAMOURAI_SERVER_DOJO_PORT
DOJO_HIDDEN_SERVICE: $SAMOURAI_SERVER_DOJO_HIDDEN_SERVICE
WHIRLPOOL_HIDDEN_SERVICE: $SAMOURAI_SERVER_WHIRLPOOL_HIDDEN_SERVICE
NODE_PREFIX_SUPPORT: support
NODE_ADMIN_KEY: $SAMOURAI_SERVER_NODE_ADMIN_KEY
WHIRLPOOL_API_KEY: $SAMOURAI_SERVER_WHIRLPOOL_API_KEY
ports:
- "$APP_SAMOURAI_SERVER_DOJO_PORT:80"
- "$APP_SAMOURAI_SERVER_CONNECT_PORT:8081"
depends_on:
- node
networks:
default:
ipv4_address: $APP_SAMOURAI_SERVER_IP