Project URL: https://github.com/snipe/snipe-it Page REF: https://snipe-it.readme.io/docs/docker
CentOS 7.1
docker
The version of snipe-it is 4.0.15,which is the newest now.
docker pull snipe/snipe-it
docker run --rm snipe-it
my_env_file
to generate mysql-container container.# filenale: my_env_file
# Mysql Parameters
MYSQL_ROOT_PASSWORD=YOUR_WANTED_PASSWORD
MYSQL_DATABASE=snipeit
MYSQL_USER=snipeit
MYSQL_PASSWORD=YOUR_WANTED_PASSWORD
# Email Parameters
MAIL_PORT_587_TCP_ADDR=smtp.qq.com
MAIL_PORT_587_TCP_PORT=587
[email protected]
[email protected]
# - pick 'tls' for SMTP-over-SSL, 'tcp' for unencrypted
MAIL_ENV_ENCRYPTION=tcp
[email protected]
MAIL_ENV_PASSWORD=xxxxxxxxxx
# Snipe-IT Settings
APP_ENV=production
APP_DEBUG=false
APP_KEY=base64:Wj8a/HJfcWu5FxsVtr9rraImf7B6JkQWuVp2nhahPgI=
APP_URL=http://127.0.0.1:80
APP_TIMEZONE=Asia/Shanghai
APP_LOCALE=zh-CN
my_env_file
docker run --name snipe-mysql --env-file=my_env_file -d -p 3306:3306 mysql:5.6
Explaination:
d, print the container id after start it success
p, port map
mkdir -p /data/snipeit
docker run -d -p 80:80 -p 443:443 --name="snipeit" --link snipe-mysql:mysql -v /data/snipeit:/var/lib/snipeit --env-file=my_env_file snipe-it
Use "/data/snipeit" to store data,port 80 for http and 443 for https.
Visit http://IP with broswer.