Running Snipe-IT in Docker
6 هزار بار بازدید -
9 ماه پیش
-
#SnipeIT
#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
[email protected]
MAIL_FROM_NAME='Snipe-IT'
[email protected]
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: discord
★ Reddit: Reddit: i12bretro
★ Twitter: Twitter: i12bretro
*** 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
[email protected]
MAIL_FROM_NAME='Snipe-IT'
[email protected]
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: discord
★ Reddit: Reddit: i12bretro
★ Twitter: Twitter: i12bretro
9 ماه پیش
در تاریخ 1402/09/23 منتشر شده
است.
6,021
بـار بازدید شده