Skip to content

Instantly share code, notes, and snippets.

@okjodom
Created October 4, 2023 05:49
Show Gist options
  • Save okjodom/f8f8868ace900b7de305f0f44d4f8336 to your computer and use it in GitHub Desktop.
Save okjodom/f8f8868ace900b7de305f0f44d4f8336 to your computer and use it in GitHub Desktop.
# Best used if called by 'tls-download-mutinynet.sh' script
# fedimint.my-super-host.com should be replaced by a domain controlled by you and all DNS below should redirect to the IP of your server.
# Domains:
# - fedimint.my-super-host.com
# - gatewayd.fedimint.my-super-host.com
# - gateway-ui.fedimint.my-super-host.com
# - rtl.fedimint.my-super-host.com
version: "3.3"
services:
traefik:
image: "traefik:v2.10"
container_name: "traefik"
command:
#- "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.websecure.address=:443"
- "--certificatesresolvers.myresolver.acme.tlschallenge=true"
# - "--certificatesresolvers.myresolver.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory"
# - "--certificatesresolvers.myresolver.acme.email=postmaster@example.com"
- "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
ports:
- "443:443"
volumes:
- "letsencrypt_data:/letsencrypt"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
gatewayd:
image: fedimint/gatewayd:v0.1.1
command: gatewayd lnd
environment:
# Path to folder containing gateway config and data files
- FM_GATEWAY_DATA_DIR=/gateway_data
# Gateway webserver listen address
- FM_GATEWAY_LISTEN_ADDR=0.0.0.0:80
# Public URL from which the webserver API is reachable
- FM_GATEWAY_API_ADDR=https://gatewayd.fedimint.my-super-host.com
# Gateway webserver authentication password
- FM_GATEWAY_PASSWORD=thereisnosecondbest
# Configured gateway routing fees Format: <base_msat>,<proportional_millionths>
- FM_GATEWAY_FEES=0,0
# LND RPC address
- FM_LND_RPC_ADDR=https://lnd:10009
# LND TLS cert file path
- FM_LND_TLS_CERT=/lnd_data/tls.cert
# LND macaroon file path
- FM_LND_MACAROON=/lnd_data/data/chain/bitcoin/signet/admin.macaroon
volumes:
- gateway_datadir:/gateway_data
- lnd_datadir:/lnd_data
depends_on:
- lnd
restart: always
platform: linux/amd64
labels:
- "traefik.enable=true"
- "traefik.http.services.gatewayd.loadbalancer.server.port=80"
- "traefik.http.routers.gatewayd.rule=Host(`gatewayd.fedimint.my-super-host.com`)"
- "traefik.http.routers.gatewayd.entrypoints=websecure"
- "traefik.http.routers.gatewayd.tls.certresolver=myresolver"
gateway-ui:
image: fedimintui/gateway-ui:master
environment:
- PORT=80
- REACT_APP_FM_GATEWAY_API=https://gatewayd.fedimint.my-super-host.com
- REACT_APP_FM_GATEWAY_PASSWORD=thereisnosecondbest
depends_on:
- gatewayd
restart: always
platform: linux/amd64
labels:
- "traefik.enable=true"
- "traefik.http.services.gateway-ui.loadbalancer.server.port=80"
- "traefik.http.routers.gateway-ui.rule=Host(`gateway-ui.fedimint.my-super-host.com`)"
- "traefik.http.routers.gateway-ui.entrypoints=websecure"
- "traefik.http.routers.gateway-ui.tls.certresolver=myresolver"
lnd:
image: lightninglabs/lnd:v0.16.4-beta
entrypoint: bash
command:
- -c
- lnd --bitcoin.active --bitcoin.signet --bitcoin.dnsseed=0 --bitcoin.node=bitcoind --protocol.wumbo-channels --bitcoind.rpchost=bitcoind --bitcoind.rpcuser=bitcoin --bitcoind.rpcpass=bitcoin --bitcoind.zmqpubrawblock=tcp://bitcoind:48332 --bitcoind.zmqpubrawtx=tcp://bitcoind:48333 --listen=0.0.0.0:9735 --rpclisten=0.0.0.0:10009 --restlisten=0.0.0.0:8080 --tlsextradomain=lnd --noseedbackup
ports:
- "10009:10009"
- "0.0.0.0:9735:9735"
volumes:
- lnd_datadir:/root/.lnd
depends_on:
- bitcoind
restart: always
rtl_config_writer:
image: alpine:latest
command:
- sh
- -c
- |
cat <<EOF > /rtl_data/RTL-Config.json
{
"multiPass": "thereisnosecondbest",
"port": "80",
"defaultNodeIndex": 1,
"SSO": {
"rtlSSO": 0,
"rtlCookiePath": "",
"logoutRedirectLink": ""
},
"nodes": [
{
"index": 1,
"lnNode": "LND",
"lnImplementation": "LND",
"Authentication": {
"macaroonPath": "/root/.lnd/data/chain/bitcoin/signet",
"configPath": "/root/.lnd/lnd.conf"
},
"Settings": {
"logLevel": "ERROR",
"lnServerUrl": "https://lnd:8080",
"fiatConversion": false,
"unannouncedChannels": false
}
}
]
}
EOF
tail -f /dev/null
volumes:
- rtl_datadir:/rtl_data
depends_on:
- lnd
restart: always
rtl:
image: shahanafarooqui/rtl:0.14.0
environment:
- RTL_CONFIG_PATH=/rtl_data
volumes:
- rtl_datadir:/rtl_data
- lnd_datadir:/root/.lnd
depends_on:
- rtl_config_writer
restart: always
labels:
- "traefik.enable=true"
- "traefik.http.services.rtl.loadbalancer.server.port=80"
- "traefik.http.routers.rtl.rule=Host(`rtl.fedimint.my-super-host.com`)"
- "traefik.http.routers.rtl.entrypoints=websecure"
- "traefik.http.routers.rtl.tls.certresolver=myresolver"
bitcoind:
image: fedimint/mutinynet-bitcoind:latest
command: --rpcuser=bitcoin --rpcpassword=bitcoin -zmqpubrawblock=tcp://[::]:48332 -zmqpubrawtx=tcp://[::]:48333
ports:
- 0.0.0.0:38333:38333
volumes:
- "bitcoin_datadir:/root/.bitcoin"
restart: always
platform: linux/amd64
volumes:
letsencrypt_data:
bitcoin_datadir:
lnd_datadir:
gateway_datadir:
thunderhub_datadir:
rtl_datadir:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment