176 lines
5.3 KiB
YAML
176 lines
5.3 KiB
YAML
services:
|
|
# ─── Reverse Proxy ────────────────────────────────────────────────────────
|
|
caddy:
|
|
image: caddy:2-alpine
|
|
container_name: caddy
|
|
restart: unless-stopped
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
- "443:443/udp" # HTTP/3
|
|
volumes:
|
|
- ./Caddyfile:/etc/caddy/Caddyfile:ro
|
|
- caddy_data:/data
|
|
- caddy_config:/config
|
|
networks:
|
|
- web-net
|
|
depends_on:
|
|
- frontend
|
|
- ntfy
|
|
- gitea
|
|
|
|
# ─── Frontend ─────────────────────────────────────────────────────────────
|
|
frontend:
|
|
build:
|
|
context: ./frontend
|
|
dockerfile: Dockerfile
|
|
container_name: frontend
|
|
restart: unless-stopped
|
|
labels:
|
|
- "com.centurylinklabs.watchtower.enable=false"
|
|
networks:
|
|
- web-net
|
|
|
|
# ─── Uptime Kuma — uptime.carloselugo.com ─────────────────────────────────
|
|
uptime-kuma:
|
|
image: louislam/uptime-kuma:1
|
|
container_name: uptime-kuma
|
|
restart: unless-stopped
|
|
volumes:
|
|
- uptime_data:/app/data
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
networks:
|
|
- web-net
|
|
cpuset: "0,1"
|
|
|
|
# ─── Netdata — metrics.carloselugo.com ────────────────────────────────────
|
|
netdata:
|
|
image: netdata/netdata:stable
|
|
container_name: netdata
|
|
restart: unless-stopped
|
|
pid: host
|
|
cap_add:
|
|
- SYS_PTRACE
|
|
- SYS_ADMIN
|
|
security_opt:
|
|
- apparmor:unconfined
|
|
environment:
|
|
- NETDATA_COLLECTOR_UPDATE_EVERY=5 # reduce polling de 1s → 5s
|
|
volumes:
|
|
- netdata_config:/etc/netdata
|
|
- netdata_lib:/var/lib/netdata
|
|
- netdata_cache:/var/cache/netdata
|
|
- /etc/passwd:/host/etc/passwd:ro
|
|
- /etc/group:/host/etc/group:ro
|
|
- /etc/localtime:/etc/localtime:ro
|
|
- /proc:/host/proc:ro
|
|
- /sys:/host/sys:ro
|
|
- /etc/os-release:/host/etc/os-release:ro
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
networks:
|
|
- web-net
|
|
cpuset: "0,1"
|
|
cpu_shares: 256 # baja prioridad relativa
|
|
|
|
# ─── Umami — DESACTIVADO (liberar RAM/CPU para enshrouded) ────────────────
|
|
# Para reactivar: descomentar umami, umami-db, y el volumen umami_db_data
|
|
# umami:
|
|
# image: ghcr.io/umami-software/umami:postgresql-latest
|
|
# container_name: umami
|
|
# restart: unless-stopped
|
|
# environment:
|
|
# DATABASE_URL: postgresql://umami:umami_password@umami-db:5432/umami
|
|
# APP_SECRET: change_this_to_a_random_string_32chars
|
|
# depends_on:
|
|
# umami-db:
|
|
# condition: service_healthy
|
|
# networks:
|
|
# - web-net
|
|
|
|
# umami-db:
|
|
# image: postgres:15-alpine
|
|
# container_name: umami-db
|
|
# restart: unless-stopped
|
|
# environment:
|
|
# POSTGRES_DB: umami
|
|
# POSTGRES_USER: umami
|
|
# POSTGRES_PASSWORD: umami_password
|
|
# volumes:
|
|
# - umami_db_data:/var/lib/postgresql/data
|
|
# networks:
|
|
# - web-net
|
|
# healthcheck:
|
|
# test: ["CMD-SHELL", "pg_isready -U umami -d umami"]
|
|
# interval: 10s
|
|
# timeout: 5s
|
|
# retries: 5
|
|
# sysctls:
|
|
# - net.ipv6.conf.all.disable_ipv6=1
|
|
|
|
# ─── ntfy — ntfy.carloselugo.com ─────────────────────────────────────────────
|
|
ntfy:
|
|
image: binwiederhier/ntfy
|
|
container_name: ntfy
|
|
restart: unless-stopped
|
|
command: serve
|
|
environment:
|
|
- TZ=America/Puerto_Rico
|
|
volumes:
|
|
- ./ntfy/config:/etc/ntfy
|
|
- ntfy_cache:/var/cache/ntfy
|
|
networks:
|
|
- web-net
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "wget -q --tries=1 http://localhost:80/v1/health -O /dev/null || exit 1"]
|
|
interval: 60s
|
|
timeout: 10s
|
|
retries: 3
|
|
|
|
# ─── Dozzle — logs.carloselugo.com ────────────────────────────────────────
|
|
dozzle:
|
|
image: amir20/dozzle:latest
|
|
container_name: dozzle
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./dozzle/data:/data
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
networks:
|
|
- web-net
|
|
|
|
# ─── Gitea — git.carloselugo.com ──────────────────────────────────────────
|
|
gitea:
|
|
image: gitea/gitea:latest
|
|
container_name: gitea
|
|
restart: unless-stopped
|
|
environment:
|
|
- USER_UID=1000
|
|
- USER_GID=1000
|
|
- GITEA__database__DB_TYPE=sqlite3
|
|
- GITEA__database__PATH=/data/gitea/gitea.db
|
|
- GITEA__server__DOMAIN=git.carloselugo.com
|
|
- GITEA__server__ROOT_URL=https://git.carloselugo.com
|
|
- GITEA__server__HTTP_PORT=3000
|
|
- GITEA__server__SSH_DOMAIN=git.carloselugo.com
|
|
- GITEA__server__SSH_PORT=2222
|
|
volumes:
|
|
- gitea_data:/data
|
|
ports:
|
|
- "2222:22"
|
|
networks:
|
|
- web-net
|
|
|
|
volumes:
|
|
caddy_data:
|
|
caddy_config:
|
|
uptime_data:
|
|
netdata_config:
|
|
netdata_lib:
|
|
netdata_cache:
|
|
# umami_db_data: # descomentar si reactivas umami
|
|
ntfy_cache:
|
|
gitea_data:
|
|
|
|
networks:
|
|
web-net:
|
|
driver: bridge
|