homarr-dashboard/portainer-stack.yml

100 lines
3.4 KiB
YAML

#======================================================================#
# Portainer Stack - Homarr Dashboard #
# Repo: git.lemonlink.eu/impulsivefps/homarr-dashboard #
#======================================================================#
#
# Deploy instructions:
# 1. In Portainer: Stacks → Add Stack
# 2. Name: homarr
# 3. Copy this file to Web Editor
# 4. Ensure /opt/homarr directory exists on host
# 5. Deploy the stack
#
# Storage location: /opt/homarr
#------------------------------------------------------------------#
version: '3.8'
services:
#------------------------------------------------------------------#
# Homarr 1.0 - Modern Dashboard #
#------------------------------------------------------------------#
homarr:
container_name: homarr
image: ghcr.io/homarr-labs/homarr:beta
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- /opt/homarr/appdata:/appdata
environment:
- SECRET_ENCRYPTION_KEY=${SECRET_ENCRYPTION_KEY}
- DB_URL=/appdata/db/homarr.db
- AUTH_PROVIDERS=${AUTH_PROVIDERS:-credentials}
- NODE_ENV=production
ports:
- '7575:7575'
networks:
- homarr-network
- npm-network # Connect to NPM for reverse proxy
depends_on:
- dash
labels:
- "com.homarr.description=Homarr Dashboard"
#------------------------------------------------------------------#
# Dash. - System Monitoring #
#------------------------------------------------------------------#
dash:
container_name: dash
image: mauricenino/dashdot:latest
restart: unless-stopped
privileged: true
volumes:
- /:/mnt/host:ro
environment:
- DASHDOT_ENABLE_CPU_TEMPS=true
- DASHDOT_ALWAYS_SHOW_PERCENTAGES=true
- DASHDOT_ENABLE_STORAGE_SPLIT_VIEW=true
- DASHDOT_PAGE_TITLE=System Overview
- DASHDOT_SPEED_TEST_INTERVAL=${DASH_SPEED_TEST_INTERVAL:-240}
- DASHDOT_WIDGET_LIST=os,cpu,storage,ram,network
- DASHDOT_OS_LABEL_LIST=brand,os,arch,up_since
- DASHDOT_CPU_LABEL_LIST=brand,model,cores,threads,frequency
- DASHDOT_STORAGE_LABEL_LIST=brand,size,type
- DASHDOT_RAM_LABEL_LIST=brand,size,type,frequency
- DASHDOT_NETWORK_LABEL_LIST=type,speed_up,speed_down,interface_speed
ports:
- '3001:3001'
networks:
- homarr-network
- npm-network
labels:
- "com.homarr.description=System Monitor"
#------------------------------------------------------------------#
# Watchtower - Auto-update containers #
#------------------------------------------------------------------#
watchtower:
container_name: watchtower
image: containrrr/watchtower:latest
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
- WATCHTOWER_CLEANUP=true
- WATCHTOWER_POLL_INTERVAL=${WATCHTOWER_INTERVAL:-86400}
- WATCHTOWER_INCLUDE_STOPPED=true
- WATCHTOWER_LABEL_ENABLE=true # Only update containers with specific label
command: --interval ${WATCHTOWER_INTERVAL:-86400}
networks:
- homarr-network
labels:
- "com.centurylinklabs.watchtower.enable=true"
networks:
homarr-network:
driver: bridge
npm-network:
external: true # Created by Nginx Proxy Manager
name: npm-network