The source for https://buildYourOwnSinatra.com
Rename .env_example to .env and then run:
$ bundle install
Then to boot simply run:
bundle exec foreman s
Note: Do not deploy this with the same design. Change the assets and the css.
You'll need three things;
- Server with dokku-alt or Heroku
- Redis
- MongoDB
Before doing anything make sure rename .env_example to .env and edit the values to match your own.
Run:
$ bundle exec mina heroku:setup
The mina script will setup redis, mongodb, and push the env vars.
Then push it:
$ git push heroku master
And seed it with data:
$ heroku run bundle exec rake seed
First boot a vm with the vagrant file:
$ vagrant up
Once things have ran grab vagrant's ssh-config with $ vagrant ssh-config
and place it into ~/.ssh/config.
Now edit nginx.conf to use your own vhost:
server_name buildYourOwnSinatra.com;
Then setup things:
$ SERVER_USER=vagrant SERVER_DOMAIN=default bundle exec mina dokku:setup --port 2222
Finally add the remote and push it:
$ git remote add vagrant vagrant@default:build-your-own-sinatra
$ git push vagrant master
First edit nginx.conf to use your own vhost:
server_name buildYourOwnSinatra.com;
Set the SERVER_URL in .env and then run:
$ bundle exec mina
The script will setup the app, create database, push environment vars etc.
Now all you have to do is push:
$ git remote add dokku [email protected]:build-your-own-sinatra
$ git push dokku master
The CSS is specifically adapted to be live edited using Takana. This comes with some drawbacks; 1. We have only use libsass features and 2. Sprocket asset paths cant be shared.
First install a compatible version of bourbon:
gem install bourbon -v 3.2.4
Then when booting takana, pass the path for the bourbon's sass to it:
takana . -i ~/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/bourbon-3.2.4/dist