Skip to content

Instantly share code, notes, and snippets.

@marviorocha
Last active October 26, 2020 12:23
Show Gist options
  • Save marviorocha/b418143c7a58342051667c352c2317be to your computer and use it in GitHub Desktop.
Save marviorocha/b418143c7a58342051667c352c2317be to your computer and use it in GitHub Desktop.
Guia de comandos para deploy no Dokku
# Criar uma aplicação no Dokku
dokku apps:create appname
# Criar e "linkar" um banco de dados PostgreSQL
dokku plugin:install https://github.com/dokku/dokku-postgres.git postgres
dokku postgres:create appname_production
dokku postgres:link appname_production appname
dokku postgres:list
# Criar e "linkar" uma instância do Redis (Não rodei esses comandos no vídeo)
# dokku plugin:install https://github.com/dokku/dokku-redis.git redis
# dokku redis:create appname_production
# dokku redis:link appname_production appname
# dokku redis:list
# Definiar variáveis de ambiente
# (você pode passar várias de uma vez)
dokku config:set appname RAILS_MASTER_KEY=123456789
# Listar variáveis de ambiente
dokku config appname
# Adicionar buildpacks
dokku buildpacks:add appname https://github.com/heroku/heroku-buildpack-ruby.git
dokku buildpacks:add appname https://github.com/heroku/heroku-buildpack-nodejs.git
# dokku buildpacks:add appname \
# https://github.com/heroku/heroku-buildpack-activestorage-preview.git
# Ver quais buildpacks foram adicionados
dokku buildpacks:list appname
# Associar nossa aplicação à um domínio
dokku domains:add appname exemple.com.br
# Ver todos os domínios
dokku domains:report
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment