- Have an AWS Account
- Spin up an EC2 Instance of Ubuntu Server and Make sure that your instance's security groups allow incoming connections on TCP ports 22 and 3000
- Use an Elastic IP to bind your Instance to it --- You would not be paying for this -- Till the time the EC2 Instance is running
- Add the IP Allocated to your A Record --- with your registrar
- Have a SSH Connection to your EC2 Instance with the Key Pairs
- Connect to the EC2 Instance
1. sudo apt-get install -y nodejs
2. sudo apt-get install libmysqlclient-dev.
3. sudo apt-get install libsqlite3-dev # for mailcatcher will not need
4. sudo apt-get update # before starting instl --- always better to do this*
Download appropriate ruby version https://www.ruby-lang.org/en/downloads/
1. cd /tmp
2. wget http://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.4.tar.gz.
3. tar -xvzf ruby-2.2.4.tar.gz
4. cd ruby-2.2.4/
5. ./configure --prefix=/usr/local.
6. make
7. make check *ALWAYS BETTER TO DO THIS STEP ----- to check all dependencies*.
8. sudo make install
1. sudo gem update --system.
2. sudo gem install bundler -- ## UPDATE BUNDLER
sudo apt-get install git
Check this link for more details - [https://help.github.com/articles/set-up-git/#platform-linux]
1. git config --global user.name "YOUR NAME"
2. git config --global user.email "YOUR EMAIL ADDRESS"
sudo apt-get install mysql-client-5.5 mysql-server-5.5 # check latest from apt search cmd*
# Though its better to use Amazon RDS services for better throughput and better overall efficiency in the system
sudo apt-get install sphinxsearch
sudo apt-get install imagemagick
git clone git://github.com/sharetribe/sharetribe.git <preferably use a stable version>
cd sharetribe
1. cp config/database.example.yml config/database.yml
2. cd sharetribe/config
3. vi database.yml
***Edit the pwds as reqd -- Your USERNAME AND PASSWORDS as while instl mysql*
cp config/config.example.yml config/config.yml
1. vi config.yml
2. domain: *yourdomain.com:3000*
Note : there must be an entry in the A Record/CNAME Record to point to
your AWS EC2 instance IP Addresses Do not work with sharetribe
bundle install
1. bundle exec db:create
2. bundle exec rake db:schema:load
bundle exec rake ts:index
bundle exec rake ts:start
bundle exec rake jobs:work
bundle exec rails server -b 0.0.0.0 <to bind it on all interfaces>
1. nohup bundle exec rake jobs:work &
2. disown
3. bundle exec rails server -d -b 0.0.0.0
- Make an RDS Instance
- set the Instance to the same security group as your EC2 Instance -- critical
- update the databse.yml file with localhost to RDS Instance Endpoint
- Enjoy -- better speeds
- Make an IAM User with Appropriate S3 priviledges
- In the config file add bucket_name : xxx
- In the config file add Upload_bucket_name : yyy Note : Both the above buckets xxx,yyy should not be in your S3 bucket ; its better that Sharetribe creates it for you else it will not work --its a hack --dont know the exact reason
- In the config file add asset_host : zzz.cloudfront.com or a CNAME to the CDN
- In the config file ; Add the Created IAM User and pwd Now Edit the CORS Configs to accomodate Put Post Delete etc, And modify the Origin tags appropriately
SHARETRIBE ON UBUNTU 14.03 VM -- Coming Soon -- Just Click and Go
Will also put in a link to a UBUNTU 14.04 LTS VM -- downloadable soon .... just finding where to upload it to as i have it ready with me ...looking for hosting it ... maybe a torrent if no other option exists.
This is the first Sketchy Guide -- will update with images etc as i dont know how to put inline images presently
Comments/Review for better deployment is welcome
Will help me to understand is this required or not . Tx.
does anyone know how to set up deployments with bitbucket pipelines?