Base Rails Project based on my personal preferences at the moment.
Clone this repository for a base rails install according to my personal preferences at the moment.
After cloning the repo, do a find-all for the keyword @changeme
and change
any names or blocks as described beneath its location.
$ brew install asdf
# install asdf package manager$ asfd install
# install depedencies (ruby, node, yarn, etc)$ bundle install
# install ruby gems$ yarn install
# install npm modules$ docker-compose start
# start redis & postgres$ rails db:create
# create database$ rails db:migrate
# migrate schema$ rails db:seed
# seed if neededFor each env development
, staging
, production
:
$ rails secret
$ RAILS_ENV=<current env> rails c
and then > Lockbox.generate_key
EDITOR="atom --wait" rails credentials:edit --environment <current env>
# swap out editor with yours if neededsecret_key_base: <rails secret from step 1>
aws:
access_key_id: <aws key from step 2>
secret_access_key: <aws key from step 2>
assets_bucket: <s3 bucket name from step 3>
lockbox:
master_key: <lockbox key from step 4>
Start in development mode with hot-reloading via websockets
$ foreman start -f Procfile.dev
$ docker build -t thatsprettyneat-org/neature-walk .
$ docker run -p 80:3000 -env="RAILS_ENV=production" thatsprettyneat-org/neature-walk bundle exec rails server
$ docker run -env="RAILS_ENV=production" thatsprettyneat-org/neature-walk bundle exec sidekiq