lucaslucyk / raspi-services

my raspberry pi local services

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

raspi-services

my raspberry pi local services

Quickstart

Steps and guide to deploy all services on Raspberry Pi 4b.

Install Raspberry Pi OS

Go to Download page and install OS on memory card.

Disable Wifi and Bluetooth

Edit /boot/firmware/config.txt file adding dtoverlay.

# /boot/firmware/config.txt
#...

dtoverlay=disable-wifi
dtoverlay=disable-bt

Github config

Create ssh

  1. Create ssh key
cd .ssh/
ssh-keygen
  1. Complete steps
  2. Get public key
cat <ssh_key_name>.pub

Config on Github

Add ken on Github SSH Keys

Config Github params

git config --global user.name ... git config --global user.email ...

Config ssh hosts

Create .ssh/config file with content like:

Host github.com
 Hostname ssh.github.com
 Port 443
 AddKeysToAgent yes
 PreferredAuthentications publickey
 IdentityFile ~/.ssh/<ssh_key_name>

Host gitlab.com
 Hostname gitlab.com
 AddKeysToAgent yes
 PreferredAuthentications publickey
 IdentityFile ~/.ssh/<ssh_key_name>

Config aliases

Add alias section on .gitconfig file.

[alias]
    cb = "rev-parse --abbrev-ref HEAD"
    cm = "commit -am"
    po = "push origin"
    cfg = "config --global -l"
    st = "status -sb"
    ll = "log --oneline"
    lc = "log -1 HEAD --stat"
    dv = "difftool -t vimdiff -y"
    search = "!git rev-list --all | xargs git grep -F"
    rv = "remote -v"

Install Docker

Follow steps of Docker install Guide

Add pi user to docker group

Prevent use sudo for each docker command

sudo usermod -aG docker pi

Enable rclone

Go to home dir and run

docker run -it -v ~/.config/rclone:/config/rclone rclone/rclone config

On finish, update file permission for docker

sudo chmod 0644 .config/rclone/rclone.conf

Info and detail

  • Credentials: link

  • Info: video

Clone services and up

git clone ...
cd raspi-services

Create .env file with content like:

WEBPASSWORD=supersecret

Start containers

docker-compose up -d

About

my raspberry pi local services

License:MIT License