Public | Automated Build

Last pushed: 3 years ago
Short Description
Short description is empty for this repo.
Full Description

Dashboard (Save & Share and My Retriever)

Startup project

make build

The make build install or update the (gem) dependencies

Install libcouchbase: to connect to couchbase.

Run project locally

make server

Run inside Docker Container

Make sure you have docker installed

make docker

Windows users

Having installed boot2docker and after double clicking boot2docker icon, inside docker console run the following commands:

docker pull jproyo/saveshare-b2c:dev

docker run -v /Users/mxhero/saveshare_b2c:/opt/mxhero/saveshare_b2c -p 9292:9292 -t -i jproyo/saveshare-b2c:dev    

Once you are inside docker container run

root@fd486e6953e5:/opt/mxhero/saveshare_b2c# make server


Add new dependency:

dep add gem-lib
dep install

dev env:

dep -f add gem-library
dep -f install

Run the tests

make test

or simple


Prepare server

Setup RVM

rvm install 2.1.2 
rvm use 2.1.2
rvm gemset create saveshare_b2c

Create deployer user

The deployment and service (thin) management must be released with the group 'deployer'. Then if use a common user (deployer too) must avoid the use of a particular user for access through ssh (using the key of every deploy real user in the authorized_keys)

adduser deployer

In case of don't create deployer user, create a group user

groupadd deployer

Thin service script

Create the thin script wrapper to work with the correct gemset (ruby-2.1.2@saveshare_b2c)

rvm wrapper ruby-2.1.2@saveshare_b2c saveshare thin

This command create the executable /usr/local/rvm/bin/saveshare_thin

Create the file /etc/init.d/thin_saveshare_b2c (or copy config/scripts/thin_saveshare_b2c).

sudo chmod 755 /etc/init.d/thin_saveshare_b2c

Create the config thin folder:

sudo mkdir /etc/thin_saveshare_b2c
sudo chmod 644 /etc/thin_saveshare_b2c

Copy the file config/scripts/apps.yml in this folder (/etc/thin_saveshare_b2c)

Include script in the sudoer (to execute without password) for the group

sudo visudo
%deployer localhost=NOPASSWD:/etc/init.d/thin_saveshare_b2c

Add user to group

vim /etc/group

Add your (public) key to authorized_keys of deployer

echo 'your public key' >> /home/deployer/.ssh/authorized_keys


cat >> /home/deployer/.ssh/authorized_keys


In stage:

cap stage deploy

In production:

cap production deploy

To see the available tasks (restart service, for example):

cap -T
Docker Pull Command
Source Repository