# Welcome to Dashy! To get started, run `docker compose up -d`
services:
  dashy:
    container_name: Dashy
    image: lissy93/dashy:latest

    # Or use a different registry (like GHCR), or a specific tag (like :4.0.0)
    # image: ghcr.io/lissy93/dashy or image: lissy93/dashy:3.0.0

    # Or, to build from source, replace `image:` with `build: .`
    # build: .

    # Set port that web service will be served on. Keep container port as 8080
    ports:
      - 4000:8080

    # Mount the directory for your conf and assets to `/app/user-data`
    # This dir NEEDS a conf.yml (the main config file for Dashy)
    # This dir can also contain other configs as well as any assets like
    # icons, stylesheets, fonts, etc which will be served from the web root (/)
    # volumes:
    #   - ./user-data:/app/user-data

    # Specify environmental variables for the Dashy server, none needed by default
    environment:
      - NODE_ENV=production

    # If your host uid is different, and causing perm errs for mounted content
    # Then you can instead use your own ids (`id -u` / `id -g`)
    # user: "1000:1000"

    # Specify restart policy
    restart: unless-stopped

    # Configure healthchecks
    healthcheck:
      test: ['CMD', 'node', '/app/services/healthcheck.js']
      interval: 1m30s
      timeout: 10s
      retries: 3
      start_period: 30s
