174 lines
3.6 KiB
Markdown
174 lines
3.6 KiB
Markdown
# homesrv01.dev.lan
|
|
|
|
Welcome to homesrv01.dev.lan git page.
|
|
|
|
## OS
|
|
|
|
Currently hosted on a proxmox ubuntu container.
|
|
|
|
Distributor ID: Ubuntu
|
|
Description: Ubuntu 23.04
|
|
Release: 23.04
|
|
Codename: lunar
|
|
Kernel: 5.15.111-1-pve
|
|
|
|
```bash
|
|
# check ubuntu release
|
|
lsb_release -a
|
|
|
|
# check kernel version
|
|
uname -r
|
|
```
|
|
## Development / Maintenance Environment
|
|
|
|
Currently using docker code server as an editor.
|
|
|
|
But doing this way, **it is important to remember that editing files, git commands and control is done in VS CODE on the Development machine, but the execution of commands must be done over ssh.**
|
|
|
|
|
|
## setup
|
|
|
|
```bash
|
|
apt update -y && apt upgrade -y
|
|
apt install curl -y
|
|
apt install git -y
|
|
curl -fsSL https://get.docker.com -o get-docker.sh && sh ./get-docker.sh
|
|
docker run hello-world && docker info
|
|
docker volume create --driver local --opt type=none --opt device=/ --opt o=bind host_fs
|
|
apt install sshfs
|
|
```
|
|
|
|
## fstab
|
|
|
|
```
|
|
#/etc/fstab
|
|
#sshfs#media@nas.lan:/home/media /mnt/media@sshfs:nas.lan fuse defaults,_netdev,allow_other,follow_symlinks 0 0
|
|
```
|
|
|
|
|
|
## ssh
|
|
|
|
```bash
|
|
#/etc/ssh/sshd_config
|
|
PermitRootLogin no
|
|
```
|
|
|
|
```bash
|
|
systemctl restart ssh
|
|
```
|
|
|
|
|
|
## Update System
|
|
|
|
```bash
|
|
apt update -y && apt upgrade -y && apt autoremove -y
|
|
```
|
|
|
|
if error on update because of EOL [check oficial documentation](https://help.ubuntu.com/community/EOLUpgrades#SpecificOlder)
|
|
|
|
## logs & Promtail
|
|
|
|
Check folder docker/promtail for more information
|
|
|
|
|
|
|
|
## Services
|
|
|
|
|
|
### External volumes
|
|
|
|
```
|
|
docker volume create --driver local --opt type=none --opt device=/home/admin/repos --opt o=bind hostfs_home_admin_repos
|
|
docker volume create --driver local --opt type=none --opt device=/mnt/media@sshfs:nas.lan --opt o=bind music
|
|
docker volume create --driver local --opt type=none --opt device=/ --opt o=bind hostfs
|
|
```
|
|
|
|
### Portainer
|
|
for more information [check](https://git.limbosolutions.com/kb/portainer)
|
|
|
|
#### Setup & Update
|
|
``` bash
|
|
services/portainer/docker-run.sh
|
|
```
|
|
|
|
### nginx
|
|
|
|
#### Setup & Update
|
|
``` bash
|
|
services/nginx/docker-run.sh
|
|
```
|
|
|
|
### code-server
|
|
|
|
#### Setup & Update
|
|
``` bash
|
|
services/code-server/docker-run.sh
|
|
```
|
|
|
|
|
|
|
|
### home assistant
|
|
[Git Repo](https://git.limbosolutions.com/marcio.fernandes/homeAssistant)
|
|
|
|
[from dev machine](services/has/README.md)
|
|
|
|
|
|
for setup execute on portainer docker compose then mount on code server
|
|
```
|
|
- has_config:/config/workspace/host/repos/homesrv01.dev.lan/services/has/volumes/config
|
|
```
|
|
|
|
on code server from repo root folder
|
|
|
|
```
|
|
cd services
|
|
mkdir has
|
|
cd has
|
|
git glone ssh://git@git.limbosolutions.com:2222/marcio.fernandes/homeAssistant.git .
|
|
```
|
|
|
|
### LMS
|
|
[Git Repo](https://git.limbosolutions.com/marcio.fernandes/lms)
|
|
|
|
[from dev machine](services/lms/README.md)
|
|
|
|
|
|
for setup execute on portainer docker compose then mount on code server
|
|
```
|
|
```
|
|
|
|
on code server from repo root folder
|
|
|
|
```
|
|
cd services
|
|
mkdir lms
|
|
cd lms
|
|
git glone https://git.limbosolutions.com/marcio.fernandes/lms .
|
|
```
|
|
|
|
### Mosquitto
|
|
|
|
[Git Repo](https://git.limbosolutions.com/marcio.fernandes/mosquitto)
|
|
|
|
[from dev machine](services/mosquitto/README.md)
|
|
|
|
|
|
for setup execute on portainer docker compose then mount on code server
|
|
```
|
|
- mosquitto_config:/config/workspace/host/repos/homesrv01.dev.lan/services/mosquitto/volumes/config
|
|
- mosquitto_data:/config/workspace/host/repos/homesrv01.dev.lan/service/mosquitto/volumes/data
|
|
```
|
|
|
|
on code server from repo root folder
|
|
|
|
```
|
|
cd services
|
|
mkdir mosquitto
|
|
cd mosquitto
|
|
git glone ssh://git@git.limbosolutions.com:2222/marcio.fernandes/mosquitto.git .
|
|
```
|
|
|
|
|
|
|
|
|