isaacrlevin / HomeNetworkSetup
- пятница, 25 декабря 2020 г. в 00:23:56
Shell
Repo to define my use of docker containers on my home network with Reverse Proxy Configuration
I have 2 Raspberry Pi 4bs in my house that is running a handful of docker containers to do MISC things on my home network and I wanted to be able to easily reach these services and have a more managed approach. I decided that I wanted to configure a Reverse Proxy to forward all my services under a single domain. This repo is what I have currently configured on my home network, and includes docker-compose yml files, and scripts to set up a similar environment.
# Create docker group and add user to it (allows non-root to run docker)
sudo groupadd docker
sudo usermod -aG docker <youruser>`
newgrp docker
# Run docker at startup
sudo systemctl enable docker
git clone https://github.com/isaacrlevin/HomeNetworkSetup.git docker
sudo setfacl -Rdm g:docker:rwx ~/docker
sudo chmod -R 775 ~/docker
chmod 600 ~/docker/traefik/acme/acme.json
docker network create --gateway 192.168.50.1 --subnet 192.168.50.0/24 traefik_proxy
At this point you should have an environment ready to start building containers. At this point, you can follow the BLOG(starting HERE) and start configuring to your heart's content.
.bash_aliases
as they are super helpful, as well as the .env file in the ymlfiles
directory.resolv.conf
to this repo as I had a problem with DNS on SOME containers. Mounting this file inside the container (done in the yml files) resolved it (PUN INTENDED).I am not even close to an expert on these things, but I was able to hack away to get what I was looking for, and I am pretty happy with it. All my services are accessible outside my network and are secured with Google Auth. Is this the best/safest implementation? NO! If you want to know how I did some of this stuff, or want to chat, hit me up on Discussions