54 lines
1.1 KiB
YAML
54 lines
1.1 KiB
YAML
version: "3.8"
|
|
|
|
services:
|
|
relay:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: sonr-relay
|
|
restart: unless-stopped
|
|
env_file:
|
|
- config.env
|
|
ports:
|
|
- "${IPFS_TCP_PORT:-4001}:4001"
|
|
- "${IPFS_TCP_PORT:-4001}:4001/udp"
|
|
- "${IPFS_WS_PORT:-4003}:4003"
|
|
- "${API_PORT:-5020}:5020"
|
|
volumes:
|
|
- relay_data:/app/.ipfs
|
|
networks:
|
|
- sonr-network
|
|
healthcheck:
|
|
test: ["CMD", "wget", "--spider", "-q", "http://localhost:5020/ipfs"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
|
|
nginx:
|
|
image: nginx:alpine
|
|
container_name: sonr-relay-proxy
|
|
restart: unless-stopped
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
volumes:
|
|
- ../nginx/relay.conf:/etc/nginx/conf.d/default.conf:ro
|
|
- ./certs:/etc/nginx/certs:ro
|
|
depends_on:
|
|
- relay
|
|
networks:
|
|
- sonr-network
|
|
|
|
volumes:
|
|
relay_data:
|
|
|
|
networks:
|
|
sonr-network:
|
|
driver: bridge
|