Skip to content

πŸ“ My simple Raspberry Pi setup for a home server running various services

License

Notifications You must be signed in to change notification settings

andrewsardone/pi-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

pi-steup

My simple Raspberry Pi setup for a simple home server running various services like Pi-hole and network-attached storage.

Raspbery Pi 4 Unboxing

Architecture

Keeping things simple by managing most services via Docker containers that are spun up and down by systemd. For a given service, the basic directory structure is as such:

Service Directory Structure

pi-setup
└── example-service
    β”œβ”€β”€ .env
    β”œβ”€β”€ .gitignore
    β”œβ”€β”€ docker-compose-example-service.service
    β”œβ”€β”€ docker-compose.yml
    └── <various config and data directories>

.env

Environment-variable configuration for injecting instance-specific configu values and secrets maypped into the container via docker-compose. This should be gitignored.

.gitignore

Git ignore rules specific to the given service.

docker-compose-example-service.service

The systemd service unit that declares how the service should be managed via systemd. Registered with systemctl. For example:

# docker-compose-example-service.service
[Unit]
Description=An example service managed by docker-compose
Requires=docker.service
After=docker.service

[Service]
Type=oneshot
RemainAfterExit=yes
WorkingDirectory=/home/pi/pi-setup/example-service
ExecStart=/usr/local/bin/docker-compose up -d
ExecStop=/usr/local/bin/docker-compose down
TimeoutStartSec=0

[Install]
WantedBy=multi-user.target
pushd example-service
sudo systemctl enable "$PWD/docker-compose-example-service.service"
popd

docker-compose.yml

The configuration file for telling docker-compose how to run the container. See the Docker Compose docs for more information.

Getting Started

For now to keep things simple, I recommend just rolling with Raspbian Lite for your OS and setting up some initial dependencies via deps.sh. Then, to install the various services and get them up and running, run make install.

About

πŸ“ My simple Raspberry Pi setup for a home server running various services

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published