docker-compose.yml
Rama main · réplica de lectura del repositorio original.
# Run whichever edition you need:
# docker compose --profile light up -d
# docker compose --profile ui up -d
#
# This file is meant to be usable on its own, without a clone:
#
# curl -O https://raw.githubusercontent.com/DevManfre/isitdown/main/docker-compose.yml
# docker compose --profile ui up -d
#
# So each service names a published GHCR image and `pull_policy: missing`,
# which makes Compose pull it instead of building from a source tree the
# operator may not have. Contributors keep the local build: `--build` on the
# command line overrides the policy, and both services still point at this
# repository's Dockerfile, each selecting its own target.
services:
isitdown-light:
# `.env` is optional: the distributable path starts with no file but this
# one, and a channel's secrets are added later.
build:
context: .
dockerfile: Dockerfile
target: light
image: ghcr.io/devmanfre/isitdown:light-latest
pull_policy: missing
container_name: isitdown-light
restart: unless-stopped
env_file:
- path: .env
required: false
volumes:
- ./config.yml:/app/config/config.yml:ro
- isitdown-light-data:/app/data
profiles: ["light"]
isitdown-ui:
build:
context: .
dockerfile: Dockerfile
target: ui
image: ghcr.io/devmanfre/isitdown:ui-latest
pull_policy: missing
container_name: isitdown-ui
restart: unless-stopped
env_file:
- path: .env
required: false
ports:
# Loopback only: the dashboard has no login by default. For LAN exposure,
# change the left side to "0.0.0.0:3000" AND set API_TOKEN (docs/configuration.md).
- "127.0.0.1:3000:3000"
# No config.yml: the UI edition keeps its configuration in SQLite.
volumes:
- isitdown-ui-data:/app/data
profiles: ["ui"]
# A second point of view for probes (roadmap 1.7), meant for another
# network — a small VPS, a second site — not for the host the main instance
# runs on. The Light image under its own command: stateless, no volume, no
# config file; the main instance sends every probe it wants run. Point it at
# this one with OUTPOSTS=https://<this host>:8080 and the same OUTPOST_TOKEN.
isitdown-outpost:
build:
context: .
dockerfile: Dockerfile
target: light
image: ghcr.io/devmanfre/isitdown:light-latest
pull_policy: missing
container_name: isitdown-outpost
restart: unless-stopped
command: ["node", "dist/outpost/index.js"]
# OUTPOST_TOKEN goes in `.env`; the outpost refuses to start without one.
env_file:
- path: .env
required: false
ports:
- "8080:8080"
# The Light image's own healthcheck reads a state file this has none of.
healthcheck:
test: ["CMD", "node", "dist/outpost/healthcheck.js"]
interval: 30s
timeout: 5s
start_period: 10s
retries: 3
profiles: ["outpost"]
volumes:
isitdown-light-data:
isitdown-ui-data: