Skip to content

[QUESTION] How to use a named docker volume #598

@remygrandin

Description

@remygrandin

Question

Hi,

I'm trying to deploy Dashy on my docker cluster, however for that I need to be able to use a named volume for persistent storage.
I saw in your documentation an exemple of docker compose but with a direct file mapping for persistence.

I tried this

dashy:
    image: lissy93/dashy
    container_name: BattleStation_Dashy
    # Pass in your config file below, by specifying the path on your host machine
    volumes:
      - persistent-Dashy:/public/
    # Set any environmental variables
    environment:
      - NODE_ENV=production
    # Specify your user ID and group ID. You can find this by running `id -u` and `id -g`
      - UID=500
      - GID=500
    # Specify restart policy
    restart: unless-stopped
    # Configure healthchecks
    healthcheck:
      test: ['CMD', 'node', '/app/services/healthcheck']
      interval: 1m30s
      timeout: 10s
      retries: 3
      start_period: 40s
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.battleStation_dashy_web.entrypoints=web"
      - "traefik.http.routers.battleStation_dashy_web.rule=Host(`XXXXXXXXX`)"
      - "traefik.http.routers.battleStation_dashy_websecure.entrypoints=websecure"
      - "traefik.http.routers.battleStation_dashy_websecure.tls=true"
      - "traefik.http.routers.battleStation_dashy_websecure.rule=Host(`XXXXXXXX`)"

Is there a way to specify the path of the config storage ? maybe with and ENV variable ?

Category

Setup and Deployment

Please tick the boxes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions