84 lines
1.7 KiB
Markdown
84 lines
1.7 KiB
Markdown
Подключаюсь к нужной машине
|
|
|
|
## 2. Подключаемся
|
|
```sh
|
|
ssh igor@192.168.200.84 -p 22
|
|
```
|
|
|
|
## 3. Создаём директории
|
|
```sh
|
|
sudo mkdir -p /opt/dashy &&
|
|
sudo mkdir -p /opt/dashy/data &&
|
|
sudo chmod -R 777 /opt/dashy &&
|
|
sudo chown -R $USER:$USER /opt/dashy &&
|
|
```
|
|
|
|
Создаём файл конфигурации
|
|
```sh
|
|
cd /opt/dashy/data &&
|
|
cat > conf.yml <<EOF
|
|
pageInfo:
|
|
title: Home Lab
|
|
sections: # An array of sections
|
|
- name: Example Section
|
|
icon: far fa-rocket
|
|
items:
|
|
- title: GitHub
|
|
description: Dashy source code and docs
|
|
icon: fab fa-github
|
|
url: https://github.com/Lissy93/dashy
|
|
- title: Issues
|
|
description: View open issues, or raise a new one
|
|
icon: fas fa-bug
|
|
url: https://github.com/Lissy93/dashy/issues
|
|
- name: Local Services
|
|
items:
|
|
- title: Grafana
|
|
icon: https://static-00.iconduck.com/assets.00/grafana-icon-942x1024-18c9p0yp.png
|
|
url: http://192.168.200.84:3000
|
|
- title: Uptime-kuma
|
|
icon: https://raw.githubusercontent.com/louislam/uptime-kuma/b45dc6787db6530e8dda1388a37e8a80683da5a8/public/icon.svg
|
|
url: http://192.168.200.84:3001
|
|
EOF
|
|
```
|
|
|
|
```sh
|
|
sudo chmod 666 /opt/dashy/data/conf.yml
|
|
```
|
|
|
|
## 3. Создаём файл и записываем настройки:
|
|
|
|
```sh
|
|
cd /opt/dashy &&
|
|
cat > docker-compose.yml <<EOF
|
|
services:
|
|
dashy:
|
|
image: lissy93/dashy:latest
|
|
container_name: my-dashboard
|
|
ports:
|
|
- "3002:8080"
|
|
volumes:
|
|
- /opt/dashy/data/conf.yml:/app/user-data/conf.yml
|
|
restart: always
|
|
EOF
|
|
```
|
|
|
|
|
|
## 4. Запуск контейнера
|
|
```sh
|
|
cd /opt/dashy &&
|
|
sudo docker-compose up -d
|
|
```
|
|
```sh
|
|
cd /opt/dashy &&
|
|
sudo docker-compose down
|
|
```
|
|
|
|
|
|
|
|
```sh
|
|
exit
|
|
```
|
|
```sh
|
|
start http://192.168.200.84:3002
|
|
``` |