Public | Automated Build

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

mail2Cloud B2C

Startup project

make startup
make update

The make update install or update the (gem) dependencies

Install libcouchbase: https://github.com/couchbase/couchbase-ruby-client#install to connect to couchbase.

Dependencies

Add new dependency:

dep add gem-lib
dep install

dev env:

dep -f .gems.dev add gem-library
dep -f .gems.dev install

Run the tests

make test

or simple

make

Prepare server

Setup RVM

rvm install 2.1.2 
rvm use 2.1.2
rvm gemset create mail2cloud_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@mail2cloud_b2c)

rvm wrapper ruby-2.1.2@mail2cloud_b2c mail2cloud thin

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

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

sudo chmod 755 /etc/init.d/thin_mail2cloud_b2c

Create the config thin folder:

sudo mkdir /etc/thin_mail2cloud_b2c
sudo chmod 644 /etc/thin_mail2cloud_b2c

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

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

sudo visudo
%deployer localhost=NOPASSWD:/etc/init.d/thin_mail2cloud_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

or

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

Deploy

In stage:

cap stage deploy

In production:

cap production deploy

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

cap -T
Docker Pull Command
Owner
mxhero
Source Repository

Comments (0)