update
parent
6c7a99e817
commit
8f1ae6955e
@ -0,0 +1,49 @@
|
||||
# Get Good in Linux terminal
|
||||
|
||||
###### guide-by-example
|
||||
|
||||
|
||||
WORK IN PROGRESS<br>
|
||||
WORK IN PROGRESS<br>
|
||||
WORK IN PROGRESS<br>
|
||||
|
||||
You want or need to use terminal in linux.<br>
|
||||
You want it to not suck donkey balls.
|
||||
|
||||
*requirements* - installed linux distro once, knows what a distro is,
|
||||
knows how how to install packages in linux, knows what a repository is
|
||||
and other basic terms
|
||||
|
||||
### Core aspects to make comfortable
|
||||
|
||||
* Terminal
|
||||
* ssh in to linux
|
||||
* moving between directories
|
||||
* editing files
|
||||
|
||||
### Advanced aspects
|
||||
|
||||
* shell
|
||||
* services and systemd
|
||||
* logs
|
||||
* scheduled stuff
|
||||
* filesystems and mounting
|
||||
|
||||
# Terminal
|
||||
|
||||
The application that you run to connect remotely to a server.<br>
|
||||
For windows you want to use mobaXterm. Learn how to use well.
|
||||
|
||||
Tips
|
||||
|
||||
* set font globaly to something larger, like 14<br>
|
||||
Settings > Configuration > Terminal > Default Font Settings<br>
|
||||
be aware that once set it only applies to newly created sessions,
|
||||
if there is a session in left pane it already has own settings that needs changing
|
||||
* be aware of copy paste in it, middle click right click menu
|
||||
*
|
||||
|
||||
# SSH
|
||||
|
||||
You connect to the linux server only sometimes, but when you do
|
||||
you want it to be instant
|
@ -0,0 +1,146 @@
|
||||
# LubeLog in docker
|
||||
|
||||
###### guide-by-example
|
||||
|
||||
![logo](https://i.imgur.com/7zjQQzy.png)
|
||||
|
||||
# Purpose & Overview
|
||||
|
||||
Vehicle service records and maintainence tracker.
|
||||
|
||||
* [Official site](https://lubelogger.com/)
|
||||
* [Github](https://github.com/hargata/lubelog)
|
||||
|
||||
LubeLogger is a new open source vehicle info dump place.
|
||||
|
||||
Written in javascript with LiteDB file based database.
|
||||
|
||||
# Files and directory structure
|
||||
|
||||
```
|
||||
/home/
|
||||
└── ~/
|
||||
└── docker/
|
||||
└── LubeLog/
|
||||
├── 🗁 lubelog_config/
|
||||
├── 🗁 lubelog_data/
|
||||
├── 🗁 lubelog_documents/
|
||||
├── 🗁 lubelog_images/
|
||||
├── 🗁 lubelog_keys/
|
||||
├── 🗁 lubelog_log/
|
||||
├── 🗁 lubelog_temp/
|
||||
├── 🗁 lubelog_translations/
|
||||
├── 🗋 .env
|
||||
└── 🗋 docker-compose.yml
|
||||
```
|
||||
|
||||
* `lubelog directories` - with data
|
||||
* `.env` - a file containing environment variables for docker compose
|
||||
* `docker-compose.yml` - a docker compose file, telling docker how to run the containers
|
||||
|
||||
Only the two files are required. The directories are created on the first run.
|
||||
|
||||
# docker-compose
|
||||
|
||||
[Dockercompose](https://github.com/hargata/lubelog/blob/main/docker-compose.yml)
|
||||
from the github page used as a template.
|
||||
|
||||
`docker-compose.yml`
|
||||
```yml
|
||||
services:
|
||||
lubelog:
|
||||
image: ghcr.io/hargata/lubelogger:latest
|
||||
container_name: lubelog
|
||||
hostname: lubelog
|
||||
restart: unless-stopped
|
||||
env_file: .env
|
||||
volumes:
|
||||
- ./lubelog_config:/App/config
|
||||
- ./lubelog_data:/App/data
|
||||
- ./lubelog_translations:/App/wwwroot/translations
|
||||
- ./lubelog_documents:/App/wwwroot/documents
|
||||
- ./lubelog_images:/App/wwwroot/images
|
||||
- ./lubelog_temp:/App/wwwroot/temp
|
||||
- ./lubelog_log:/App/log
|
||||
- ./lubelog_keys:/root/.aspnet/DataProtection-Keys
|
||||
ports:
|
||||
- 8080:8080
|
||||
|
||||
networks:
|
||||
default:
|
||||
name: $DOCKER_MY_NETWORK
|
||||
external: true
|
||||
```
|
||||
|
||||
`.env`
|
||||
```bash
|
||||
# GENERAL
|
||||
DOCKER_MY_NETWORK=caddy_net
|
||||
TZ=Europe/Bratislava
|
||||
|
||||
#LUBELOG
|
||||
LC_ALL=en_US.UTF-8
|
||||
LANG=en_US.UTF-8
|
||||
MailConfig__EmailServer=smtp-relay.brevo.com
|
||||
MailConfig__EmailFrom=lubelog@example.com
|
||||
MailConfig__UseSSL=True
|
||||
MailConfig__Port=587
|
||||
MailConfig__Username=<registration-email@gmail.com>
|
||||
MailConfig__Password=<brevo-smtp-key-goes-here>
|
||||
LOGGING__LOGLEVEL__DEFAULT=Error
|
||||
```
|
||||
|
||||
**All containers must be on the same network**.</br>
|
||||
Which is named in the `.env` file.</br>
|
||||
If one does not exist yet: `docker network create caddy_net`
|
||||
|
||||
# Reverse proxy
|
||||
|
||||
Caddy v2 is used, details
|
||||
[here](https://github.com/DoTheEvo/selfhosted-apps-docker/tree/master/caddy_v2).</br>
|
||||
|
||||
`Caddyfile`
|
||||
```php
|
||||
auto.{$MY_DOMAIN} {
|
||||
reverse_proxy lubelog:80
|
||||
}
|
||||
```
|
||||
|
||||
# First run
|
||||
|
||||
---
|
||||
|
||||
|
||||
# Trouble shooting
|
||||
|
||||
|
||||
# Update
|
||||
|
||||
Manual image update:
|
||||
|
||||
- `docker-compose pull`</br>
|
||||
- `docker-compose up -d`</br>
|
||||
- `docker image prune`
|
||||
|
||||
It is **strongly recommended** to now add current **tags** to the images in the compose.<br>
|
||||
Tags will allow you to easily return to a working state if an update goes wrong.
|
||||
|
||||
|
||||
# Backup and restore
|
||||
|
||||
#### Backup
|
||||
|
||||
|
||||
#### Restore
|
||||
|
||||
|
||||
# Backup of just user data
|
||||
|
||||
|
||||
#### Backup script
|
||||
|
||||
|
||||
#### Cronjob - scheduled backup
|
||||
|
||||
# Restore the user data
|
||||
|
@ -1,7 +1,14 @@
|
||||
# reset config
|
||||
|
||||
`/system reset-configuration`
|
||||
|
||||
# clien mode range extender
|
||||
|
||||
|
||||
|
||||
# Dumb switch with wifi AP
|
||||
|
||||
## Objective
|
||||
|
||||
|
||||
## Steps
|
||||
|
||||
|
@ -0,0 +1,63 @@
|
||||
# Mounting Network Shares in Linux
|
||||
|
||||
possible ways to mount stuff - fstab, autofs, systemd, docker volumes if its for docker
|
||||
|
||||
possible types of shares
|
||||
|
||||
* smb/samba/cifs - the most common share, support on all OS
|
||||
* nfs - mostly used between linux machines, bit better performance
|
||||
* iSCSI - the share is mounted as a block device as if it was really a disk,
|
||||
great performance for small files
|
||||
|
||||
More on setup of these shares is in
|
||||
[TrueNAS Scale guide.](https://github.com/DoTheEvo/selfhosted-apps-docker/tree/master/trueNASscale)
|
||||
|
||||
# smb/samba/cifs
|
||||
|
||||
[Arch wiki](https://wiki.archlinux.org/title/samba#As_systemd_unit)
|
||||
on samba systemd mount
|
||||
|
||||
* you will create two files in `/etc/systemd/system`
|
||||
* one will have extension `.mount` the other `.automount`
|
||||
* the name will be the same for both and it MUST correspond with the planned
|
||||
mount path. Slashes `/` being replaced by dashes `-`.<br>
|
||||
So if the share should be at `/mnt/mirror` the files are named
|
||||
`mnt-mirror.mount` and `mnt-mirror.automount`
|
||||
* copy paste the bellow content, edit as you see fit,
|
||||
changing description, ip address and path, user and password,..
|
||||
* linux command `id` will show your current user `uid` and `gid`
|
||||
* after ther changes execute command `sudo systemctl enable mnt-mirror.automount`
|
||||
This will setup mounting that does not fail on boot if there are network issues,
|
||||
and really mounts the target only on request
|
||||
|
||||
`mnt-mirror.mount`
|
||||
```ini
|
||||
[Unit]
|
||||
Description=3TB truenas mirror mount
|
||||
|
||||
[Mount]
|
||||
What=//10.0.19.11/Mirror
|
||||
Where=/mnt/mirror
|
||||
Type=cifs
|
||||
Options=rw,username=kopia,password=aaa,file_mode=0644,dir_mode=0755,uid=1000,gid=1000
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
|
||||
`mnt-mirror.automount`
|
||||
```ini
|
||||
[Unit]
|
||||
Description=3TB truenas mirror mount
|
||||
|
||||
[Automount]
|
||||
Where=/mnt/mirror
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
|
||||
### Useful commants
|
||||
|
||||
`smbclient -L 10.0.19.11` - list shares mounted from the ip
|
||||
`systemctl list-units -t mount --all`
|
Loading…
Reference in New Issue