mirror of
https://github.com/benjamin-wilson/public-pool.git
synced 2026-09-29 09:05:06 -07:00
102 lines
2.5 KiB
YAML
102 lines
2.5 KiB
YAML
services:
|
|
bitcoin-testnet:
|
|
container_name: bitcoin-testnet
|
|
build:
|
|
context: ./docker/bitcoin
|
|
dockerfile: Dockerfile
|
|
restart: unless-stopped
|
|
stop_grace_period: 30s
|
|
networks:
|
|
- bitcoin-testnet
|
|
ports:
|
|
- "127.0.0.1:18332:18332/tcp"
|
|
- "0.0.0.0:18333:18333/tcp"
|
|
command: >
|
|
-printtoconsole
|
|
-datadir=/app/data
|
|
-testnet
|
|
volumes:
|
|
- "./data/testnet/bitcoin:/app/data"
|
|
- "./bitcoin-testnet.conf:/app/data/bitcoin.conf:ro"
|
|
|
|
timescaledb-testnet:
|
|
image: timescale/timescaledb:latest-pg17
|
|
container_name: public-pool-testnet-timescaledb
|
|
restart: unless-stopped
|
|
networks:
|
|
- bitcoin-testnet
|
|
environment:
|
|
POSTGRES_DB: public_pool_testnet
|
|
POSTGRES_USER: public_pool
|
|
POSTGRES_PASSWORD: public_pool
|
|
command:
|
|
- postgres
|
|
- -c
|
|
- max_wal_size=16GB
|
|
- -c
|
|
- min_wal_size=2GB
|
|
- -c
|
|
- checkpoint_timeout=15min
|
|
- -c
|
|
- checkpoint_completion_target=0.9
|
|
- -c
|
|
- wal_compression=on
|
|
volumes:
|
|
- "./data/testnet/timescaledb:/var/lib/postgresql/data"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U public_pool -d public_pool_testnet"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 10
|
|
|
|
redis-testnet:
|
|
image: redis:8-alpine
|
|
container_name: public-pool-testnet-redis
|
|
restart: unless-stopped
|
|
networks:
|
|
- bitcoin-testnet
|
|
volumes:
|
|
- "./data/testnet/redis:/data"
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 10
|
|
|
|
public-pool-testnet:
|
|
container_name: public-pool-testnet
|
|
build:
|
|
context: ..
|
|
dockerfile: Dockerfile
|
|
restart: unless-stopped
|
|
stop_grace_period: 30s
|
|
depends_on:
|
|
timescaledb-testnet:
|
|
condition: service_healthy
|
|
redis-testnet:
|
|
condition: service_healthy
|
|
networks:
|
|
- bitcoin-testnet
|
|
ports:
|
|
- "0.0.0.0:13333:13333/tcp"
|
|
- "0.0.0.0:13332:13332/tcp"
|
|
- "0.0.0.0:13331:13331/tcp"
|
|
- "0.0.0.0:13330:13330/tcp"
|
|
- "127.0.0.1:13334:13334/tcp"
|
|
volumes:
|
|
- "./public-pool-testnet.env:/public-pool/.env:ro"
|
|
- "../secrets:/public-pool/secrets:ro"
|
|
environment:
|
|
NODE_ENV: production
|
|
DB_HOST: timescaledb-testnet
|
|
DB_PORT: 5432
|
|
DB_USERNAME: public_pool
|
|
DB_PASSWORD: public_pool
|
|
DB_DATABASE: public_pool_testnet
|
|
REDIS_URL: redis://redis-testnet:6379
|
|
PM2_ENABLED: "true"
|
|
STRATUM_WORKERS: ${STRATUM_WORKERS:-2}
|
|
|
|
networks:
|
|
bitcoin-testnet:
|