[QUESTION] Authentication System
Question
I read the docs but i don't really understand how to implement an autheticathion system. I don't want everyone to have access to all services.
Here the dokcer compose file i run as stack inside portainer:
version: '3'
services:
dashy:
image: lissy93/dashy:2.0.0
container_name: Dashy
environment:
- NODE_ENV=production
- DASHY_USERNAME=InfinityMonster
restart: always
healthcheck:
test: ['CMD', 'node', '/app/services/healthcheck']
interval: 1m30s
timeout: 10s
retries: 3
start_period: 40s
volumes:
- ./dashy-config:/app/public/config
networks:
- webproxy
networks:
webproxy:
external: true
I read something about a config file but i can't find it. following directory is empty:
/var/lib/docker/volumes/dashy_dashy_data/_data
Category
Configuration
Please tick the boxes
- [X] You are using a supported version of Dashy (check the first two digits of the version number)
- [X] You've checked that this question hasn't already been raised
- [X] You've checked the docs and troubleshooting guide
- [X] You agree to the code of conduct
If you're enjoying Dashy, consider dropping us a ⭐
🤖 I'm a bot, and this message was automated
Firstly, you can check the documentation about authentication setup here: https://dashy.to/docs/authentication#setting-up-authentication
- Following the
Built-In Authmethod, you have to add this to theconf.yml:
appConfig.auth.enableGuestAccess: true # for enabling guest mode
# guest: no autenticated users
appConfig:
auth:
users:
- user: alicia
hash: 4D1E58C90B3B94BCAD9848ECCACD6D2A8C9FBC5CA913304BBA5CDEAB36FEEFA3
type: admin # admins can make make changes to disk
- user: bob
hash: 5E884898DA28047151D0E56F8DC6292773603D0D6AABBDD62A11EF721D1542D8
# this user without admin can't make changes to disk -
You can follow the documentation for more customization.
For this, you need to have access to the config file located on /app/public/conf.yml
You can access going to settings on the WebUI.
If for some reason, the changes are not being saved on the webUI
You have to make sure that you have access to the conf.yml.
Add this to your docker-compose.yml
...
volumes:
- ./dashy-config/my-config.yml:/app/public/conf.yml
...
Example of docker file: https://dashy.to/docs/deployment#using-docker-compose
---
version: "3.8"
services:
dashy:
# To build from source, replace 'image: lissy93/dashy' with 'build: .'
# build: .
image: lissy93/dashy
container_name: Dashy
# Pass in your config file below, by specifying the path on your host machine
# volumes:
# - /root/my-config.yml:/app/public/conf.yml
ports:
- 4000:80
# 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=1000
# - GID=1000
# Specify restart policy
restart: unless-stopped
# Configure healthchecks
healthcheck:
test: ['CMD', 'node', '/app/services/healthcheck']
interval: 1m30s
timeout: 10s
retries: 3
start_period: 40s- Basic Auth
Welcome to Dashy, so glad you're here :) Deployment is super easy, and there are several methods available depending on what type of system you're using. If you're self-hosting, then deploying with Docker (or similar container engine) is the recommended approach.
This issue has gone 3 months without an update. To keep the ticket open, please indicate that it is still relevant in a comment below. Otherwise it will be closed in 5 working days.
This issue was automatically closed because it has been stalled for over 6 weeks with no activity.
