- Configurar chave SSH
- Criar Droplet
- Realizar update e upgrade
- Crua usuário
adduser deployeusermod -aG sudo deploy - Cria pasta
.sshprodeploy cp ~/.ssh/authorized_keys /home/deploy/.ssh/authorized_keyschown -R deploy:deploy .ssh/chmod 700 .ssh
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
| server { | |
| server_name testdeploy.rocketseat.com.br; | |
| location / { | |
| proxy_pass http://127.0.0.1:3333; | |
| proxy_http_version 1.1; | |
| proxy_set_header Upgrade $http_upgrade; | |
| proxy_set_header Connection 'upgrade'; | |
| proxy_set_header Host $host; | |
| proxy_set_header X-Real-IP $remote_addr; |
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
| function interceptNetworkRequests(ee) { | |
| const open = XMLHttpRequest.prototype.open; | |
| const send = XMLHttpRequest.prototype.send; | |
| const isRegularXHR = open.toString().indexOf('native code') !== -1; | |
| // don't hijack if already hijacked - this will mess up with frameworks like Angular with zones | |
| // we work if we load first there which we can. | |
| if (isRegularXHR) { |
- Assuming you have multiple Heroku apps and Git remote like so:
development https://git.heroku.com/xxx.git (fetch)
development https://git.heroku.com/xxx.git (push)
origin git@bitbucket.org:xxx/xxx.git (fetch)
origin git@bitbucket.org:xxx/xxx.git (push)
production https://git.heroku.com/xxx.git (fetch)
production https://git.heroku.com/xxx.git (push)
staging https://git.heroku.com/xxx.git (fetch)
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
| HTTP status code symbols for Rails | |
| Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings. | |
| Status Code Symbol | |
| 1xx Informational | |
| 100 :continue | |
| 101 :switching_protocols | |
| 102 :processing |
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
| #!/bin/bash | |
| ## Install Znuny 7.0.16 on Ubuntu 22.04 | |
| ## https://doc.znuny.org/znuny_lts/releases/installupdate/install.html | |
| ## https://itgovernanceportal.com/otrs/otrs-znuny-ubuntu-nginx/?cn-reloaded=1 | |
| ## https://download.znuny.org/releases/znuny-7.0.16.tar.gz | |
| ## Run as root (sudo su) | |
| cd /opt | |
| wget https://download.znuny.org/releases/znuny-7.0.16.tar.gz |