Тёмный

Running Snipe-IT in Docker 

i12bretro
Подписаться 13 тыс.
Просмотров 7 тыс.
50% 1

#SnipeIT #AssetManagement #Docker
*** Updated 08/05/2024
Full steps can be found at i12bretro.gith...
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. - snipe-it.readm...
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 download.docke... -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)] download.docke... -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 raw.githubuser...
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='≪%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 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

Опубликовано:

 

16 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 20   
@matlovhubz
@matlovhubz 7 месяцев назад
i installed it. But i only can edit with local IP, when i set domain with public ip, i still can access and login but i cant see or edit anything. How can i fix it?
@CC-zr6fp
@CC-zr6fp 3 месяца назад
Do I need to change the APP_URL=null portion? Everything else worked (had to change the last docker run command to be /home/user/docker/snipeit/.env to correct the docker: open ~/docker/snipeit/.env: no such file or directory. See 'docker run --help'. error. When going to the local ip of ubuntu I get " can't currently handle this request."
@ArvindGaba
@ArvindGaba 4 месяца назад
I changed ~/ to /root/docker/snipeit/.env and it worked
@humidbeing
@humidbeing 8 месяцев назад
This no longer works in latest Ubuntu server. /docker/snipeit/.env: no such file or directory. and the file is definitely there.
@takeover4726
@takeover4726 7 месяцев назад
i got the same problem, file is there but doesnt read permissions are correct.
@ultralord_gg6178
@ultralord_gg6178 6 месяцев назад
add two dashes in front of restart in the final command
@Markobu4u
@Markobu4u 6 месяцев назад
try putting /home/{your_username}/ in front of docker/snipeit/.env
@rhinopctecsupport4704
@rhinopctecsupport4704 6 месяцев назад
I followed the instructions to the letter and can't get to work, Why?
@Bridgeable-NathanB
@Bridgeable-NathanB 8 месяцев назад
Thanks for this. Question for you. Why would you not being using the --restart=unless-stopped on the snipe-it run command as well?
@i12bretro
@i12bretro 8 месяцев назад
It absolutely should. I fixed this in the steps. Thanks for pointing this out!
@ultralord_gg6178
@ultralord_gg6178 6 месяцев назад
@@i12bretro those who are blindly copy-pasting are unaware that you typed "restart=unless-stopped" instead of "--restart=unless-stopped" and are stuck on final step
@i12bretro
@i12bretro 6 месяцев назад
This has been fixed. Thanks for the heads up
@raul230285
@raul230285 10 месяцев назад
Nice 🎉
@rhinopctecsupport4704
@rhinopctecsupport4704 6 месяцев назад
anybody else got to work to help me out?
@tj_p979
@tj_p979 8 месяцев назад
last step error: docker: open ~/docker/snipeit/.env: no such file or directory. See 'docker run --help'.
@i12bretro
@i12bretro 8 месяцев назад
Did the wget command succeed that downloads the .env file?
@RicardoMeleiro
@RicardoMeleiro 7 месяцев назад
Using EC2 ? Same error message here.
@SoHoIntegration
@SoHoIntegration 7 месяцев назад
change it to the full path, then you get past that error. However, the next error is: docker: invalid reference format.
@okejaa
@okejaa 7 месяцев назад
Use this command - docker run -d --name snipeit -p 8000:80 --network snipeit --env-file ~/docker/snipeit/.env -v ~/docker/snipeit/data:/var/lib/snipeit -v ~/docker/snipeit/config:/config --restart=unless-stopped snipe/snipe-it:v5.1.7
@ultralord_gg6178
@ultralord_gg6178 6 месяцев назад
add two dashes in front of restart in the final command
Далее
18 Weird and Wonderful ways I use Docker
26:18
Просмотров 297 тыс.
Is it time to switch? // Docker vs Podman Desktop
16:05
Собираю Маню к осени ✨
00:48
Просмотров 975 тыс.
Snipe-IT Asset Management in Docker
30:46
Просмотров 59 тыс.
Using docker in unusual ways
12:58
Просмотров 456 тыс.
A First Look At Zorin OS 17.2
16:36
Просмотров 38 тыс.
Dockge: The New Docker Manager You Need To See!
22:23
The intro to Docker I wish I had when I started
18:27
Просмотров 160 тыс.
I forced EVERYONE to use Linux
22:59
Просмотров 562 тыс.
Собираю Маню к осени ✨
00:48
Просмотров 975 тыс.