docker to services folder
This commit is contained in:
90
README.md
90
README.md
@@ -72,7 +72,7 @@ Check folder docker/promtail for more information
|
||||
|
||||
|
||||
|
||||
## Services (Stacks)
|
||||
## Services
|
||||
|
||||
|
||||
### External volumes
|
||||
@@ -86,42 +86,88 @@ docker volume create --driver local --opt type=none --opt device=/ --opt o=bind
|
||||
### Portainer
|
||||
for more information [check](https://git.limbosolutions.com/kb/portainer)
|
||||
|
||||
#### Setup & Update
|
||||
``` 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
|
||||
services/portainer/docker-run.sh
|
||||
```
|
||||
|
||||
### nginx
|
||||
[docker-compose](docker/nginx/docker-compose.yaml)
|
||||
|
||||
```bash
|
||||
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/nginx-selfsigned.key -out /etc/ssl/certs/nginx-selfsigned.crt -subj "/C=PT/ST=Lisbon/L=Lisbon/O=LimboSolutions/OU=LimboSolutions/CN=has.lan"
|
||||
|
||||
#### Setup & Update
|
||||
``` bash
|
||||
services/nginx/docker-run.sh
|
||||
```
|
||||
|
||||
### code-server
|
||||
[docker-compose](docker/code-server/docker-compose.yaml)
|
||||
|
||||
```bash
|
||||
|
||||
mkdir /config/workspace/docker/nginx/volumes
|
||||
ln -s /mnt/nginx_config /config/workspace/docker/nginx/volumes/nginx_config
|
||||
|
||||
mkdir /config/workspace/docker/zigbee2mqtt/volume
|
||||
ln -s /mnt/zigbee2mqtt_data /config/workspace/docker/zigbee2mqtt/volumes/zigbee2mqtt_datta
|
||||
|
||||
#### Setup & Update
|
||||
``` bash
|
||||
services/code-server/docker-run.sh
|
||||
```
|
||||
|
||||
|
||||
|
||||
### home assistant
|
||||
[docker-compose](docker/has/docker-compose.yaml)
|
||||
[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
|
||||
[docker-compose](docker/lms/docker-compose.yaml)
|
||||
[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 .
|
||||
```
|
||||
|
||||
### mosquitto
|
||||
[docker-compose](docker/mosquitto/docker-compose.yaml)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,21 +1,16 @@
|
||||
#!/bin/bash
|
||||
#scriptPath=$(dirname "$0") not working if called from symbolic link
|
||||
scriptPath="$(dirname "$(readlink -f "$0")")"
|
||||
doWork(){
|
||||
apt update -y
|
||||
apt upgrade -y
|
||||
$scriptPath/../docker/portainer/docker-run.sh
|
||||
$scriptPath/../docker/promtail/docker-run.sh
|
||||
$scriptPath/../docker/telegraf/docker-run.sh
|
||||
$scriptPath/../docker/code-server/docker-run.sh
|
||||
$scriptPath/../docker/nginx/docker-run.sh
|
||||
$scriptPath/../services/portainer/docker-run.sh
|
||||
$scriptPath/../services/promtail/docker-run.sh
|
||||
$scriptPath/../services/telegraf/docker-run.sh
|
||||
$scriptPath/../services/code-server/docker-run.sh
|
||||
$scriptPath/../services/nginx/docker-run.sh
|
||||
docker image prune -f
|
||||
}
|
||||
doWork 2>&1 | logger -s -t "auto-update"
|
||||
|
||||
#doWork 2>&1 | logger -t "auto-update"
|
||||
#example to check logs for autou-pdate
|
||||
#journalctl --since yesterday -u cron.service | grep auto-update
|
||||
exit 0
|
||||
|
||||
|
||||
|
||||
@@ -13,10 +13,10 @@ services:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- code-server_config:/config
|
||||
- code-server_root:/root
|
||||
- has_config:/config/workspace/host/repos/homesrv01.dev.lan/lib/homeAssistant/volumes/config
|
||||
- has_config:/config/workspace/host/repos/homesrv01.dev.lan/services/has/volumes/config
|
||||
- ./../nginx/volumes/nginx_conf:/config/workspace/host/repos/homesrv01.dev.lan/services/nginx/volumes/nginx_conf
|
||||
- mosquitto_config:/config/workspace/host/repos/homesrv01.dev.lan/lib/mosquitto/volumes/config
|
||||
- mosquitto_data:/config/workspace/host/repos/homesrv01.dev.lan/lib/mosquitto/volumes/data
|
||||
- mosquitto_config:/config/workspace/host/repos/homesrv01.dev.lan/services/mosquitto/volumes/config
|
||||
- mosquitto_data:/config/workspace/host/repos/homesrv01.dev.lan/services/mosquitto/volumes/data
|
||||
- zigbee2mqtt_data:/config/workspace/host/repos/homesrv01.dev.lan/services/zigbee2mqtt/volumes/data
|
||||
- hostfs:/mnt/hostfs
|
||||
networks:
|
||||
|
||||
Reference in New Issue
Block a user