Create a new installation directory and new Docker Compose file
mkdir /opt/alerta && \
bash -c "cat > /opt/alerta/docker-compose.yml" << 'EOF'
services:
web:
image: alerta/alerta-web
ports:
- "8080:8080"
depends_on:
- db
environment:
- DEBUG=1 # remove this line to turn DEBUG off
- DATABASE_URL=postgres://postgres:postgres@db:5432/monitoring
- AUTH_REQUIRED=True
- ADMIN_USERS=admin@alerta.io,devops@alerta.io #default password: alerta
- ADMIN_KEY=demo-key
- PLUGINS=reject,blackout,normalise,enhance
restart: always
db:
image: postgres
volumes:
- ./pg-data:/var/lib/postgresql/data
environment:
POSTGRES_DB: monitoring
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
restart: always
EOF
Start Alerta
docker compose up -d