stacker.news/docker-compose.yml

278 lines
7.4 KiB
YAML
Raw Normal View History

2021-10-20 19:57:11 +00:00
version: "3"
services:
db:
container_name: db
build: ./docker/db
2024-03-07 16:19:37 +00:00
restart: unless-stopped
healthcheck:
2024-03-08 03:24:42 +00:00
test: ["CMD-SHELL", "PGPASSWORD=${POSTGRES_PASSWORD} psql -U ${POSTGRES_USER} ${POSTGRES_DB} -c 'SELECT 1 FROM users LIMIT 1'"]
2024-03-07 19:18:23 +00:00
interval: 10s
timeout: 10s
retries: 10
start_period: 1m
2021-10-20 19:57:11 +00:00
expose:
- "5432"
ports:
- "5431:5432"
env_file:
- .env.sndev
volumes:
- ./docker/db/seed.sql:/docker-entrypoint-initdb.d/seed.sql
- db:/var/lib/postgresql/data
2021-10-20 19:57:11 +00:00
app:
container_name: app
build: ./
2024-03-07 16:19:37 +00:00
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000"]
interval: 10s
timeout: 10s
retries: 10
2024-03-07 19:18:23 +00:00
start_period: 1m
2021-10-20 19:57:11 +00:00
depends_on:
2024-03-06 23:38:34 +00:00
db:
condition: service_healthy
restart: true
opensearch:
condition: service_healthy
restart: true
2021-10-20 19:57:11 +00:00
env_file:
- .env.sndev
2024-03-06 23:38:34 +00:00
expose:
- "3000"
2021-10-20 19:57:11 +00:00
ports:
- "3000:3000"
volumes:
- ./:/app
links:
- db
- opensearch
2024-03-08 03:24:42 +00:00
- sn_lnd
worker:
container_name: worker
build: ./worker
2024-03-07 16:19:37 +00:00
restart: unless-stopped
depends_on:
db:
2024-03-06 23:38:34 +00:00
condition: service_healthy
restart: true
app:
condition: service_healthy
restart: true
2024-03-06 23:38:34 +00:00
opensearch:
condition: service_healthy
restart: true
env_file:
- .env.sndev
volumes:
- ./:/app
links:
- db
- app
- opensearch
2024-03-08 03:24:42 +00:00
- sn_lnd
entrypoint: ["/bin/sh", "-c"]
command:
2024-03-06 23:38:34 +00:00
- npm run worker:dev
imgproxy:
container_name: imgproxy
image: darthsim/imgproxy:v3.18.1
healthcheck:
test: [ "CMD", "imgproxy", "health" ]
interval: 10s
2024-03-07 19:18:23 +00:00
timeout: 10s
retries: 10
start_period: 1m
2024-03-07 16:19:37 +00:00
restart: unless-stopped
env_file:
- .env.sndev
ports:
- "3001:8080"
links:
- app
opensearch:
image: opensearchproject/opensearch:latest
container_name: opensearch
2024-03-06 23:38:34 +00:00
healthcheck:
2024-03-08 03:24:42 +00:00
test: ["CMD-SHELL", "curl -ku admin:${OPENSEARCH_INITIAL_ADMIN_PASSWORD} --silent --fail localhost:9200/_cluster/health || exit 1"]
2024-03-06 23:38:34 +00:00
interval: 10s
timeout: 10s
retries: 10
2024-03-07 19:18:23 +00:00
start_period: 1m
2024-03-07 16:19:37 +00:00
restart: unless-stopped
2024-03-08 03:24:42 +00:00
env_file:
- .env.sndev
environment:
2024-03-07 22:39:50 +00:00
- OPENSEARCH_INITIAL_ADMIN_PASSWORD=mVchg1T5oA9wudUh
ports:
- 9200:9200 # REST API
- 9600:9600 # Performance Analyzer
volumes:
- os:/usr/share/opensearch/data
command: >
bash -c '
set -m
/usr/share/opensearch/opensearch-docker-entrypoint.sh &
2024-03-08 03:24:42 +00:00
until curl -sS "http://localhost:9200/_cat/health?h=status" -ku admin:${OPENSEARCH_INITIAL_ADMIN_PASSWORD} | grep -q "green\|yellow"; do
echo "Waiting for OpenSearch to start..."
sleep 1
done
echo "OpenSearch started."
2024-03-08 03:24:42 +00:00
curl -X PUT "http://localhost:9200/item" -ku admin:${OPENSEARCH_INITIAL_ADMIN_PASSWORD}
echo "OpenSearch index created."
fg
'
os-dashboard:
image: opensearchproject/opensearch-dashboards:latest
container_name: os-dashboard
2024-03-07 16:19:37 +00:00
restart: unless-stopped
depends_on:
opensearch:
condition: service_healthy
restart: true
2024-03-08 03:24:42 +00:00
env_file:
- .env.sndev
environment:
- opensearch.ssl.verificationMode=none
- OPENSEARCH_HOSTS=http://opensearch:9200
2024-03-08 03:24:42 +00:00
- server.ssl.enabled=false
ports:
- 5601:5601
expose:
- "5601"
links:
- opensearch
2024-03-08 03:24:42 +00:00
bitcoin:
image: polarlightning/bitcoind:26.0
container_name: bitcoin
restart: unless-stopped
stop_grace_period: '5m'
healthcheck:
test: ["CMD", "bitcoin-cli", "-rpcport=${RPC_PORT}", "-rpcuser=${RPC_USER}", "-rpcpassword=${RPC_PASS}", "getblockchaininfo"]
interval: 10s
timeout: 10s
retries: 10
start_period: 1m
command:
- 'bitcoind'
- '-server=1'
- '-regtest=1'
- '-rpcauth=${RPC_USER}:${RPC_AUTH}'
- '-debug=1'
- '-zmqpubrawblock=tcp://0.0.0.0:${ZMQ_BLOCK_PORT}'
- '-zmqpubrawtx=tcp://0.0.0.0:${ZMQ_TX_PORT}'
- '-txindex=1'
- '-dnsseed=0'
- '-upnp=0'
- '-rpcbind=0.0.0.0'
- '-rpcallowip=0.0.0.0/0'
- '-rpcport=${RPC_PORT}'
- '-rest'
- '-listen=1'
- '-listenonion=0'
- '-fallbackfee=0.0002'
- '-blockfilterindex=1'
- '-peerblockfilters=1'
expose:
- "${RPC_PORT}"
- "${P2P_PORT}"
- "${ZMQ_BLOCK_PORT}"
- "${ZMQ_TX_PORT}"
volumes:
- bitcoin:/home/bitcoin/.bitcoin
sn_lnd:
image: polarlightning/lnd:0.17.4-beta
container_name: sn_lnd
restart: unless-stopped
healthcheck:
test: ["CMD", "lncli", "getinfo"]
interval: 10s
timeout: 10s
retries: 10
start_period: 1m
depends_on:
bitcoin:
condition: service_healthy
restart: true
env_file:
- .env.sndev
2024-03-08 03:24:42 +00:00
command:
- 'lnd'
- '--noseedbackup'
- '--trickledelay=5000'
- '--alias=sn_lnd'
- '--externalip=sn_lnd'
- '--tlsextradomain=sn_lnd'
- '--tlsextradomain=host.docker.internal'
- '--listen=0.0.0.0:${LND_P2P_PORT}'
- '--rpclisten=0.0.0.0:${LND_GRPC_PORT}'
- '--restlisten=0.0.0.0:${LND_REST_PORT}'
- '--bitcoin.active'
- '--bitcoin.regtest'
- '--bitcoin.node=bitcoind'
- '--bitcoind.rpchost=bitcoin'
- '--bitcoind.rpcuser=${RPC_USER}'
- '--bitcoind.rpcpass=${RPC_PASS}'
- '--bitcoind.zmqpubrawblock=tcp://bitcoin:${ZMQ_BLOCK_PORT}'
- '--bitcoind.zmqpubrawtx=tcp://bitcoin:${ZMQ_TX_PORT}'
expose:
- "${LND_P2P_PORT}"
ports:
- "${LND_REST_PORT}:${LND_REST_PORT}"
- "${LND_GRPC_PORT}:${LND_GRPC_PORT}"
volumes:
- sn_lnd:/home/lnd/.lnd
- ./docker/lnd/sn/macaroons/macaroons.db:/home/lnd/.lnd/data/chain/bitcoin/regtest/macaroons.db
- ./docker/lnd/sn/tls.cert:/home/lnd/.lnd/tls.cert
- ./docker/lnd/sn/tls.key:/home/lnd/.lnd/tls.key
2024-03-08 03:24:42 +00:00
stacker_lnd:
image: polarlightning/lnd:0.17.4-beta
container_name: stacker_lnd
restart: unless-stopped
healthcheck:
test: ["CMD", "lncli", "getinfo"]
interval: 10s
timeout: 10s
retries: 10
start_period: 1m
depends_on:
bitcoin:
condition: service_healthy
restart: true
env_file:
- .env.sndev
2024-03-08 03:24:42 +00:00
command:
- 'lnd'
- '--noseedbackup'
- '--trickledelay=5000'
- '--alias=stacker_lnd'
- '--externalip=stacker_lnd'
- '--tlsextradomain=stacker_lnd'
2024-03-08 03:24:42 +00:00
- '--tlsextradomain=host.docker.internal'
- '--listen=0.0.0.0:${STACKER_LND_P2P_PORT}'
- '--rpclisten=0.0.0.0:${STACKER_LND_GRPC_PORT}'
- '--restlisten=0.0.0.0:${STACKER_LND_REST_PORT}'
- '--bitcoin.active'
- '--bitcoin.regtest'
- '--bitcoin.node=bitcoind'
- '--bitcoind.rpchost=bitcoin'
- '--bitcoind.rpcuser=${RPC_USER}'
- '--bitcoind.rpcpass=${RPC_PASS}'
- '--bitcoind.zmqpubrawblock=tcp://bitcoin:${ZMQ_BLOCK_PORT}'
- '--bitcoind.zmqpubrawtx=tcp://bitcoin:${ZMQ_TX_PORT}'
expose:
- "${STACKER_LND_P2P_PORT}"
ports:
- "${STACKER_LND_REST_PORT}:${STACKER_LND_REST_PORT}"
- "${STACKER_LND_GRPC_PORT}:${STACKER_LND_GRPC_PORT}"
volumes:
- stacker_lnd:/home/lnd/.lnd
- ./docker/lnd/stacker/tls.cert:/home/lnd/.lnd/tls.cert
- ./docker/lnd/stacker/tls.key:/home/lnd/.lnd/tls.key
volumes:
db:
os:
2024-03-08 03:24:42 +00:00
bitcoin:
sn_lnd:
stacker_lnd: