Snipe It Docker-Compose deployment
Snipe IT is a lovely Free Open Source (FOSS) project built on Laravel 5.7. Snipe It easily allows you manage your It parc with a powerful api.
Let’s take a look about the docker-compose yml file.
version: '3.7'
services:
snipe:
image: snipe/snipe-it:latest
ports:
- 8000:80
env_file: ./snipe/env-file
volumes:
- './data:/var/lib/snipeit'
links:
- snipedb:snipedb
- redis
snipedb:
image: mysql:5.6
env_file: ./snipe/.env
Nb : we used a mysql:5.6 but for the latest version of snipe it you can also use maria db.
Env-file contain all the parameters you need to configure the DB and your snipe It option you will find below an example:
Env File Parameters
#Mysql Parameters
MYSQL_ROOT_PASSWORD = awesomepassword
MYSQL_DATABASE = snipe
MYSQL_USER = snipeit
MYSQL_PASSWORD = awesomepassword
# Email Parameters
# - the hostname/IP address of your mailserver
MAIL_PORT_587_TCP_ADDR=smtp server
#the port for the mailserver (probably 587, could be another)
MAIL_PORT_587_TCP_PORT=587
# the default from address, and from name for emails
MAIL_ENV_FROM_ADDR=yourmail@domain.com
MAIL_ENV_FROM_NAME= Snipe Alerting
# - pick 'tls' for SMTP-over-SSL, 'tcp' for unencrypted
MAIL_ENV_ENCRYPTION=tls
# SMTP username and password
MAIL_ENV_USERNAME=your mail login
MAIL_ENV_PASSWORD= your mail password
# Snipe-IT Settings
APP_ENV=production
APP_DEBUG=false
APP_KEY=base64:
APP_URL=url of your snipe it
APP_TIMEZONE=Europe/Paris
APP_LOCALE=en
DB_CONNECTION=mysql
DB_HOST=snipedb
DB_DATABASE=snipe
DB_USERNAME=snipeit
DB_PASSWORD=awesomepassword
DB_PORT=3306