Home

Awesome

Start dev

rails db:create
rails db:migrate
bundle && yarn && rails hot

Deploy

Build docker image

from local

docker build --build-arg rails_env=production -t $DOCKER_ACC/$DOCKER_REPO:$IMG_TAG .

from remote (you have to pass the master_key as an build-arg)

docker build --build-arg rails_env=production --build-arg master_key=$MASTER_KEY -t $DOCKER_ACC/$DOCKER_REPO:$IMG_TAG .

push to docker hub (after login)

docker push $DOCKER_ACC/$DOCKER_REPO:$IMG_TAG

build & push image using lib/tasks/deploy.rake

rails deploy:production:push

Set credentials

open credential and paste db, redis urls

EDITOR="nano" rails credentials:edit

# like this
production:
  database_url: DATABASE_URL
  redis_url: REDIS_URL

Kubernetes

k8s/README.md