mirror of
https://github.com/benjamin-wilson/public-pool.git
synced 2026-09-29 09:05:06 -07:00
116 lines
3.0 KiB
YAML
116 lines
3.0 KiB
YAML
x-log-limits: &log-limits
|
|
driver: json-file
|
|
options:
|
|
max-size: ${DOCKER_LOG_MAX_SIZE:-100m}
|
|
max-file: "${DOCKER_LOG_MAX_FILES:-5}"
|
|
|
|
services:
|
|
bitcoin-regtest:
|
|
container_name: bitcoin-regtest
|
|
build:
|
|
context: ./docker/bitcoin
|
|
dockerfile: Dockerfile
|
|
restart: unless-stopped
|
|
stop_grace_period: 30s
|
|
logging: *log-limits
|
|
networks:
|
|
- bitcoin-regtest
|
|
ports:
|
|
- "127.0.0.1:28332:28332/tcp"
|
|
- "0.0.0.0:28333:28333/tcp"
|
|
command: >
|
|
-printtoconsole
|
|
-datadir=/app/data
|
|
-regtest
|
|
-blockversion=536870912
|
|
volumes:
|
|
- "./data/regtest/bitcoin:/app/data"
|
|
- "./bitcoin-regtest.conf:/app/data/bitcoin.conf:ro"
|
|
|
|
timescaledb-regtest:
|
|
image: timescale/timescaledb:latest-pg17
|
|
container_name: public-pool-regtest-timescaledb
|
|
restart: unless-stopped
|
|
logging: *log-limits
|
|
networks:
|
|
- bitcoin-regtest
|
|
environment:
|
|
POSTGRES_DB: public_pool_regtest
|
|
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/regtest/timescaledb:/var/lib/postgresql/data"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U public_pool -d public_pool_regtest"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 10
|
|
|
|
redis-regtest:
|
|
image: redis:8-alpine
|
|
container_name: public-pool-regtest-redis
|
|
restart: unless-stopped
|
|
logging: *log-limits
|
|
networks:
|
|
- bitcoin-regtest
|
|
volumes:
|
|
- "./data/regtest/redis:/data"
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 10
|
|
|
|
public-pool-regtest:
|
|
container_name: public-pool-regtest
|
|
build:
|
|
context: ..
|
|
dockerfile: Dockerfile
|
|
restart: unless-stopped
|
|
stop_grace_period: 30s
|
|
logging: *log-limits
|
|
depends_on:
|
|
timescaledb-regtest:
|
|
condition: service_healthy
|
|
redis-regtest:
|
|
condition: service_healthy
|
|
networks:
|
|
- bitcoin-regtest
|
|
ports:
|
|
- "0.0.0.0:23333:23333/tcp"
|
|
- "0.0.0.0:23332:23332/tcp"
|
|
- "0.0.0.0:23331:23331/tcp"
|
|
- "0.0.0.0:23330:23330/tcp"
|
|
- "127.0.0.1:23334:23334/tcp"
|
|
volumes:
|
|
- "./public-pool-regtest.env:/public-pool/.env:ro"
|
|
- "../secrets:/public-pool/secrets:ro"
|
|
environment:
|
|
NODE_ENV: production
|
|
DB_HOST: timescaledb-regtest
|
|
DB_PORT: 5432
|
|
DB_USERNAME: public_pool
|
|
DB_PASSWORD: public_pool
|
|
DB_DATABASE: public_pool_regtest
|
|
REDIS_URL: redis://redis-regtest:6379
|
|
PM2_ENABLED: "true"
|
|
STRATUM_WORKERS: ${STRATUM_WORKERS:-2}
|
|
STRATUM_MIN_DIFFICULTY: ${STRATUM_MIN_DIFFICULTY:-1}
|
|
STRATUM_SOCKET_TIMEOUT_MS: ${STRATUM_SOCKET_TIMEOUT_MS:-3600000}
|
|
STRATUM_TCP_KEEPALIVE_INITIAL_DELAY_MS: ${STRATUM_TCP_KEEPALIVE_INITIAL_DELAY_MS:-60000}
|
|
|
|
networks:
|
|
bitcoin-regtest:
|