安装
使用Docker安装
安装先决条件后,运行以下命令来拉码头图像:
docker pull snipe/snipe-it
接下来,创建名为“ my_env_file”的.ENV文件,并放置以下数据:
# Mysql Parameters MYSQL_ROOT_PASSWORD=YOUR_SUPER_SECRET_PASSWORD MYSQL_DATABASE=snipeit MYSQL_USER=snipeit MYSQL_PASSWORD=YOUR_snipeit_USER_PASSWORD # Email Parameters # - the hostname/IP address of your mailserver MAIL_PORT_587_TCP_ADDR=smtp.whatever.com #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=youremail@yourdomain.com MAIL_ENV_FROM_NAME=Your Full Email Name # - pick 'tls' for SMTP-over-SSL, 'tcp' for unencrypted MAIL_ENV_ENCRYPTION=tcp # SMTP username and password MAIL_ENV_USERNAME=your_email_username MAIL_ENV_PASSWORD=your_email_password # Snipe-IT Settings APP_ENV=production APP_DEBUG=false APP_KEY=<<Fill in Later!>> APP_URL=http://127.0.0.1:YOUR_PORT_NUMBER APP_TIMEZONE=US/Pacific APP_LOCALE=en
现在,运行以下命令运行mySQL容器:
docker run --name snipe-mysql --env-file=my_env_file --mount source=snipesql-vol,target=/var/lib/mysql -d -P mysql:5.6
最后,您可以使用以下命令旋转Docker容器:
docker run --rm snipe/snipe-it