Skip to content

A small deployment with docker of asset/license management Snipe-it.

License

Notifications You must be signed in to change notification settings

sergioduartte/snipe-docker-compose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

snipe-it with docker-compose

Atention! This is NOT a oficial branch of Snipe-it. This is a simple deployment with docker-compose and some configs that worked for me.

Building the service

  1. Prepare a new environment

    I choose the Ubuntu 16.04 LTS to deploy everything into, you can work on another that have at least 2 GB of RAM and 1 CPU.

    1.1 Update the packages.

    sudo apt -y update && sudo apt -y dist-upgrade
  2. Install docker

    curl -fsSL https://get.docker.com -o get-docker.sh
    sh get-docker.sh
  3. And docker-compose

    sudo curl -L https://github.com/docker/compose/releases/download/1.18.0/docker-compose-`uname -s`- `uname -m` -o /usr/local/bin/docker-compose
    chmod +x /usr/local/bin/docker-compose
  4. Configuring the application

    4.1 Pass the files from this repository to the deployment machine. Maybe you'll need sudo to do some operations here. If you're rebuilding the application (see the section below about backup for more details), please use rsync -ahzv /src/folder/ /dest/folder to avoid fadiga.

    4.2 Configure the variables, walkthrough the .my-env-fileand docker-compose.yml and configure your deployment as you wish.

  5. Running the application

    sudo docker-compose up -d
  6. Mail Service

    To the Mail service work properly 6.1 Get in the container

    sudo docker exec -it snipe-it /bin/bash

    6.2 Run the commands

    openssl genrsa -out /var/www/html/storage/oauth-private.key 4096

    and

    openssl rsa -in /var/www/html/storage/oauth-private.key -pubout > /var/www/html/storage/oauth-public.key
  7. [optional]Backup!

    The Backup works basically on save the folder that contains the volume of the DB and put it back on the same folder at host before run the compose.

    7.1 Acess the machine as sudo 7.2 Stop the containers 7.3 Do the rsync of volume, put it safe on somewhere else!

    rsync -ahzv /var/bin/docker/volumes/<snipesomething> /backup/folder

    Or... just save the folder that are mounted as the docker-compose.yml specifies.

Releases

No releases published

Packages

No packages published