Followed Guide: https://snipe-it.readme.io/docs/docker
Commands to create SQL and Snipe-It Containers (docker ps – to list containers)
Create your env.txt file and make a note of the full path to it on the machine
Create SQL Container:
docker run –name snipe-mysql –env-file=my_env_file –mount source=snipesql-vol,target=/var/lib/mysql -d -P mysql:5.6
Create Snipe-IT container (without SSL)
docker run -d -p 80:80 –name=”snipeit” –link snipe-mysql:mysql –env-file=my_env_file –mount source=snipe-vol,dst=/var/lib/snipeit snipe/snipe-it:latest
Create Snipe-IT container (with SSL)
docker run -d -p 80:80 -p 443:443 –name=”snipeit” –link snipe-mysql:mysql –mount source=snipe-vol,dst=/var/lib/snipeit –env-file=my_env_file snipe/snipe-it
Copy the SSL certificate (if using SSL)
docker cp snipeit-ssl.crt snipeit:/var/lib/snipeit/ssl/snipeit-ssl.crt
docker cp snipeit-ssl.key snipeit:/var/lib/snipeit/ssl/snipeit-ssl.key
Run the docker in command line to get APP_KEY
docker run –rm snipe/snipe-it
Output will show (actual key will be different than this example):
Please re-run this container with an environment variable $APP_KEY
An example APP_KEY you could use is:
base64:D5sdfs-zhFSVA3VwuoZoQ21cwBtJv/RGiqOcZ7BUvI=
Add the resulting APP_KEY to the env.txt file and generate the container again
Restore the backup file from the previous installation
scp <backupfile.zip> <username>@<hostname>:<destination path>
Copy the Backup to :/var/www/html/storage/app/backups/
docker cp backupfile.zip snipeit:/var/www/html/storage/app/backups/backupfile.zip
Copy the Public and Storage files from the previous installation
docker cp /path/to/storage/private_uploads-folder snipeit:/var/lib/snipeit/data
docker cp /path/to/public/uploads-folder snipeit:/var/lib/snipeit/data/
Restore the DB in the GUI
You will get a 500 error, just go back in the browser and login again
Recent Comments