mirror of
https://github.com/Xahau/Validation-Ledger-Tx-Store-to-xPOP.git
synced 2025-11-04 12:25:48 +00:00
62 lines
2.1 KiB
YAML
62 lines
2.1 KiB
YAML
version: '3.4'
|
|
|
|
include:
|
|
- docker-compose.mainnet.yml
|
|
- docker-compose.testnet.yml
|
|
|
|
services:
|
|
nginx:
|
|
container_name: xpopweb
|
|
read_only: true
|
|
volumes:
|
|
- ./conf/nginx.conf:/etc/nginx/nginx.conf.template:ro
|
|
- ./conf/ssl:/etc/nginx/ssl:ro
|
|
- nginxcache:/var/cache/nginx
|
|
- nginxpid:/var/run
|
|
- ./store/:/usr/share/nginx/html:ro
|
|
ports:
|
|
- ${PORT:-3000}:${PORT:-3000}
|
|
- ${SSLPORT:-3443}:${SSLPORT:-3443}
|
|
- ${PORT_TESTNET:-3001}:${PORT_TESTNET:-3001}
|
|
- ${SSLPORT_TESTNET:-3444}:${SSLPORT_TESTNET:-3444}
|
|
image: nginx:alpine
|
|
environment:
|
|
- PUBLIC_PORT=${PORT:-3000}
|
|
- PUBLIC_PORT_TESTNET=${PORT_TESTNET:-3001}
|
|
- SSLPORT=${SSLPORT:-3443}
|
|
- SSLPORT_TESTNET=${SSLPORT_TESTNET:-3444}
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: curl --fail http://localhost:3000/healthcheck || exit 1
|
|
interval: 15s
|
|
retries: 2
|
|
start_period: 5s
|
|
timeout: 5s
|
|
command: /bin/sh -c "envsubst '$$PUBLIC_PORT $$PUBLIC_PORT_TESTNET $$SSLPORT $$SSLPORT_TESTNET' < /etc/nginx/nginx.conf.template > /var/cache/nginx/conf ; nginx -c /var/cache/nginx/conf -g 'daemon off;'"
|
|
xpopcleaner:
|
|
container_name: xpopcleaner
|
|
image: alpine
|
|
entrypoint: sh -c "TTL_MINUTES_PREGEN_XPOP=${TTL_MINUTES_PREGEN_XPOP:-60} TTL_DAYS_XPOP_SOURCE_FILES=${TTL_DAYS_XPOP_SOURCE_FILES:-30} sh /cleanup.sh && tail -f /dev/null"
|
|
stop_grace_period: 0s
|
|
volumes:
|
|
- ./store:/store
|
|
- ./scripts/cleanup.sh:/cleanup.sh
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: TTL_MINUTES_PREGEN_XPOP=${TTL_MINUTES_PREGEN_XPOP:-60} TTL_DAYS_XPOP_SOURCE_FILES=${TTL_DAYS_XPOP_SOURCE_FILES:-30} sh /cleanup.sh
|
|
interval: ${TTL_MINUTES_CLEANUP_INTERVAL:-60}m
|
|
retries: 10
|
|
timeout: 55m
|
|
volumes:
|
|
nginxcache:
|
|
nginxpid:
|
|
|
|
networks:
|
|
default:
|
|
enable_ipv6: true
|
|
ipam:
|
|
driver: default
|
|
config:
|
|
- subnet: 172.28.0.0/16
|
|
- subnet: "fd00:dead:beef::/48"
|