Running Snipe-IT in Docker

Channel:
Subscribers:
14,500
Published on ● Video Link: https://www.youtube.com/watch?v=EsCh0gOrxqE



Duration: 2:42
5,737 views
40


#SnipeIT #AssetManagement #Docker

*** Updated 08/05/2024

Full steps can be found at https://i12bretro.github.io/tutorials...

What is Snipe-IT?
Snipe-IT is a Free Open Source (FOSS) project built on Laravel. Snipe-IT was made for IT asset management, to enable IT departments to track who has which laptop, when it was purchased, which software licenses and accessories are available, and so on. -  https://snipe-it.readme.io/docs
 
Installing Docker
   01. Log into the Linux host
   02. Run the following commands in a terminal window
         install prerequisites
         sudo apt install apt-transport-https ca-certificates curl software-properties-common gnupg-agent -y
         add docker gpg key
         curl -fsSL https://download.docker.com/linux/$(awk -F'=' '/^ID=/{ print $NF }' /etc/os-release)/gpg | sudo apt-key add -
         add docker software repository
         sudo add-apt-repository "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/$(awk -F'=' '/^ID=/{ print $NF }' /etc/os-release) $(lsb_release -cs) stable"
         install docker
         sudo apt install docker-ce docker-compose containerd.io -y
         enable and start docker service
         sudo systemctl enable docker && sudo systemctl start docker
         add the current user to the docker group
         sudo usermod -aG docker $USER
         reauthenticate for the new group membership to take effect
         su - $USER
 
Running Snipe-IT
   01. Continue with the following commands in terminal to setup and run Snipe-IT
         create working directories
         sudo mkdir ~/docker/snipeit/{config,data} -p && sudo mkdir ~/docker/mariadb -p
         create snipeit network
         docker network create snipeit
         download the base configuration
         sudo wget -O ~/docker/snipeit/.env https://raw.githubusercontent.com/sni...
         generate an app_key
         docker run --rm snipe/snipe-it
         edit the .env file
         sudo nano ~/docker/snipeit/.env
   02. Scroll through the .env file, making sure to comment out the mysql connection details and change the following fields as needed
         --------------------------------------------
         REQUIRED: BASIC APP SETTINGS
         --------------------------------------------
         APP_ENV=production
         APP_DEBUG=false
         APP_KEY=≪%PASTED APP_KEY%≫
         APP_URL='http://≪%DNSorIP%≫:8000'
         APP_TIMEZONE='America/New_York'
         APP_LOCALE=en
         MAX_RESULTS=500
         --------------------------------------------
         REQUIRED: UPLOADED FILE STORAGE SETTINGS
         --------------------------------------------
         PRIVATE_FILESYSTEM_DISK=local
         PUBLIC_FILESYSTEM_DISK=local_public
         --------------------------------------------
         REQUIRED: DATABASE SETTINGS
         --------------------------------------------
         DB_CONNECTION=mysql
         DB_HOST=db
         DB_DATABASE=snipe_it
         DB_USERNAME=snipe_it_rw
         DB_PASSWORD=Snip3-IT!
         DB_PREFIX=null
         --------------------------------------------
         REQUIRED: OUTGOING MAIL SERVER SETTINGS
         --------------------------------------------
         MAIL_DRIVER=smtp
         MAIL_HOST=smtp.i12bretro.local
         MAIL_PORT=25
         MAIL_USERNAME=null
         MAIL_PASSWORD=null
         MAIL_ENCRYPTION=null
         MAIL_FROM_ADDR=snipe-it@i12bretro.local
         MAIL_FROM_NAME='Snipe-IT'
         MAIL_REPLYTO_ADDR=snipe-it@i12bretro.local
         MAIL_REPLYTO_NAME='Snipe-IT'
         MAIL_AUTO_EMBED_METHOD='attachment'
   03. Press CTRL+O, Enter, CTRL+X to write the changes to .env
   04. Continue with the following commands in terminal
         set owner of docker directory
         sudo chown "$USER":"$USER" ~/docker -R
         set permissions on docker directory
         sudo chmod g+rwx "$HOME/docker" -R
         run the mariadb docker container
         docker run -d --name mariadb --network snipeit --network-alias db -e MYSQL_ROOT_PASSWORD=r00tp@ss -e MYSQL_USER=snipe_it_rw -e MYSQL_PASSWORD=Snip3-IT! -e MYSQL_DATABASE=snipe_it -v ~/docker/mariadb:/var/lib/mysql --restart=unless-stopped mariadb:latest
         run the snipeit container
         docker run -d --name snipeit -p 8000:80 --network snipeit --env-file=$HOME/docker/snipeit/.env -v ~/docker/snipeit/data:/var/lib/snipeit -v ~/docker/snipeit/config:/config --restart=unless-stopped snipe/snipe-it:v5.1.7
 
Snipe-IT Web Installer
   01. Open a web browser and navigate to http://DNSorIP:8000
   02. Review the Pre-Flight Checks summary ≫ Click the Next: Create Database Tables button


....Full steps can be found on GitHub [link at the top]


Connect with me and others ###
★ Discord:   / discord  
★ Reddit:   / i12bretro  
★ Twitter:   / i12bretro  







Tags:
Asset Management
Browser Based
Container
Containerization
Docker
Docker How To
Docker Installation Tutorial
Docker Made Easy
Docker Simplified
Docker Tutorial
Free Software
Getting Started With Docker
Home Lab
Home Lab Ideas
How To
IT Asset Management
Install Guide
Linux
Self-Hosted
Self-hosted
Snipe-IT
Tutorial
Ubuntu
Web Based
i12bretro