Last active
October 26, 2020 12:23
-
-
Save marviorocha/b418143c7a58342051667c352c2317be to your computer and use it in GitHub Desktop.
Guia de comandos para deploy no Dokku
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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