Git Product home page Git Product logo

thanatisia / home-lab-docker Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 258 KB

Containerization of my self-hosted/server setup using docker. This is essentially a collection (or a central hub) for my home lab server such that I can just clone and reuse easily.

License: GNU General Public License v3.0

Dockerfile 27.90% Shell 63.70% HTML 4.56% JavaScript 2.44% Rust 0.65% PHP 0.76%
docker docker-compose home-lab home-server self-hosted

home-lab-docker's Introduction

Personal Home Lab/Self-Hosting Server using docker-compose

Information

DESCRIPTION

	EVERYTHING MUST BE CONTAINERIZED!
	Dotfiles, Configurations, Installers

Initially created just to test out containerizing my self-host setup (traditionally install on bare metal), 
currently this is an all-in-one Docker repository to contain various 
    - Servers, 
    - Web Services, 
    - Networking Protocols or 
    - general services that can be ran on docker

If it can be ran on docker, it should be added into the repository.

Architectures

  • AMD64 : Generic 64-bit CPU architecture; Equals to x86_64
  • x86 : 32-bit CPU architecture
  • x86_64 : Generic 64-bit CPU architecture
  • arm : 32-bit ARM; arm/v6/v7/v8
  • arm64 : 64-bit ARM; arm64/v7/v8
  • armvhf : 32-bit ARM

Quickstart Guide

Folders

  • files
    Contains various combination/types of services and/or groups of services together based on the combinations in a single docker-compose environment. 
    - Examples
        + NAS File Server : Samba, Jellyfin
        + Network Server : ipsec vpn server, pihole
    
  • production
    - This folder is essentially a plug-and-play (for me, at least) docker-compose environment template for self-hosting with either ARM(64)v7 and above devices, as well as general AMD64/x86 devices.
        + Similar to a dotfile repository, this is so that I can easily deploy these environments into my server production with just a single clone.
    - I have already tested on my ArchLinux Virtual Machine docker Testbench, 
        + thus, you just need to change the variables and 
        + are ready to be deployed in a real production server environment.
    - [Security] 
        + The files you see here have all been sanitized such that sensitive information in files, environment variables are all replaced with skeleton text to explain what to input, and are all safe for referral and usage as a template.
        + Always ensure that security and private information such as public IP address (if any), usernames and passwords, credentials etc are erased from your open source configs if you are pushing it to any remote git repository server.
        + Always Remember to read the code before deployment.
    
  • services
    This folder contains subfolders for every individual services that holds Dockerfiles, docker-compose environment files and dependencies to startup that specific service individually. 
    
    • Note:
      • This folder is entirely surrounding starting up the service via docker, thus, please refer to the official documentation and/or (shameless plug starts) my guides for that server utility at SharedSpace if available (shameless plug end.) if you want to install the system on bare metal.
  • stacks
    • This folder contains docker image/services that uses effectively a stack, such as MERN, Nextcloud-LetsEncrypt-MySQL.
    • Note:
      • The docker-compose and/or service files in here does not necessarily need to be stacks, it can also be services that requires more than 1 external containers
        • i.e.
          • TubeArchivist

Setup

Pre-Requisites

  • (Optional) If using on a Hypervisor
    • VirtualBox
      • Setup NATNetwork for inter-vm network communication
      • Add a new Bridge network adapter in the network of the server Virtual Machine

Dependencies

  • docker : for...docker and dockerfile
  • docker-compose : for running docker-compose

Documentation

Usage

  • Startup docker-compose environment with building of Dockerfiles

    • Notes
      • Certain docker containers (i.e. my samba share) are built from scratch using Dockerfile and docker-compose, thus you need to run build
    docker-compose up -d --build
  • Startup docker-compose environment

    docker-compose up -d {container-name(s)}
  • Teardown docker-compose environment

    docker-compose down
  • Stop docker-compose environment

    docker-compose stop {container-name(s)}
  • Start docker-compose environment

    docker-compose start {container-name(s)}
  • Restart docker-compose environment

    • Leaving 'container-name' empty will restart all containers in the compose environment
    docker-compose restart [container-name]
  • Open Interactive Shell in docker-compose

    docker-compose run [service-name]
  • Check Error Logs

    • Generally you will want to do this if the container keeps restarting
    docker logs [container-name]
  • Inspect docker image/container details

    docker inspect [image/container-name]
  • Jump into container

    • Useful for checking container files for clues
    docker exec -it [container-name] [shell]
  • Restart only a specific container

    • Perhaps, to refresh your server after changing a config
    docker container restart [container-name]
  • Execute command in container and get standard output (stdout)

    docker exec -t [container-name] /bin/bash -c "[your-command]"

Wiki

Resources

References

Remarks

home-lab-docker's People

Contributors

thanatisia avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.