refactoring

This commit is contained in:
2024-05-07 16:54:47 +01:00
commit 75d305a03a
14 changed files with 443 additions and 0 deletions

110
README.md Normal file
View File

@@ -0,0 +1,110 @@
# 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 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 (Stacks)
### Portainer
for more information [check](https://git.limbosolutions.com/kb/portainer)
``` bash
docker pull portainer/portainer-ce
docker stop portainer
docker rm portainer
docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer:/data portainer/portainer-ce
```
### code-server
[docker-compose](docker/code-server/docker-compose.yaml)
### home assistant
[docker-compose](docker/has/docker-compose.yaml)
### LMS
[docker-compose](docker/lms/docker-compose.yaml)
### mosquitto
[docker-compose](docker/mosquitto/docker-compose.yaml)
### duplicati
- Duplicati
[docker-compose](docker/duplicati/docker-compose.yaml)
### 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
```