HomeLab Database for tracking servers, networks, services, and credentials. It uses Django & MySQL.
1.3K
Welcome to HomeLab Database, a web application designed to help you organize and manage your home network infrastructure. This project represents my first foray into creating a Dockerized application, as well as my initial exploration into Continuous Integration and Continuous Deployment (CI/CD) practices. Built with Django and MySQL, this application serves as a central repository to keep track of Networks, Servers, Services, and Credentials securely.
The application can be deployed using Docker Compose. Below is a sample docker-compose.yml file to get you started:
version: '3'
services:
db:
image: mysql:latest
environment:
MYSQL_DATABASE: 'hmlsvcrapp'
MYSQL_USER: 'hmlsvcrapp'
MYSQL_PASSWORD: 'hmlsvcrapp-password!' #change for security
MYSQL_ROOT_PASSWORD: 'hmlsvcrapp-password!-root' #change for security
volumes:
- mysql_data:/var/lib/mysql
- /createdatabase.sql:/docker-entrypoint-initdb.d
ports:
- "3306:3306"
web:
image: rherbaugh/homelabdatabase:latest
ports:
- "8001:8000"
depends_on:
- db
environment:
- DEBUG=0 #change to 1 if you want to enable debugging (not recommended in production)
- DB_PASSSWORD=default_password #match the MySQL Password above
- DJANGO_SUPERUSER_USERNAME=admin #update this if required
- [email protected] #update this field
- DJANGO_SUPERUSER_PASSWORD=adminpassword #change for security
command: >
sh -c "sleep 60 &&
python manage.py makemigrations &&
python manage.py migrate
python create_superuser.py &&
python manage.py makemigrations &&
python manage.py migrate &&
python manage.py runserver 0.0.0.0:8000"
volumes:
mysql_data:
NOTE: Ensure to replace the placeholder values with your actual configuration details.
As this project is a work in progress and my first venture into many of these technologies, I am very open to suggestions, contributions, and feedback to improve it. Feel free to fork the project, submit pull requests, or open issues on GitHub.
All code can be reviewed and contributed to on my GitHub: https://github.com/robertherbaugh/homelabdatabase.
A special thanks to ChatGPT for assisting in the development and documentation of this project. Your guidance has been invaluable.
Content type
Image
Digest
sha256:9c3b466f7…
Size
411.7 MB
Last updated
6 months ago
docker pull rherbaugh/homelabdatabase