sudo apt install git-all
ssh-keygen -t rsa -b 4096 -C "deploy"
cat ~/.ssh/id_rsa.pub
| # frozen_string_literal: true | |
| require 'rake_helper' | |
| describe 'example rake task' do | |
| describe '#run', rake: { | |
| file_name: 'file_name_of_rake_task', | |
| engine: Authentication::Engine | |
| } do | |
| it '' do; end |
| import LS from '@/utilities/LocalStorage'; | |
| export default ({ paths }) => (store) => { | |
| let committingMutation = []; | |
| store.subscribe((mutation) => { | |
| committingMutation = LS.get('committingMutation') || []; | |
| const mutationType = mutation.type; | |
| if (committingMutation.indexOf(mutationType) !== -1) return; | |
| if (paths.indexOf(mutationType) !== -1) { | |
| LS.set(mutationType, mutation.payload); |
| module.exports = { | |
| apps: [ | |
| { | |
| name: "API", | |
| script: "yarn", | |
| cwd: "/home/deploy/hoang_app/current", | |
| error_file: "/home/deploy/hoang_app/logs/web.err.log", | |
| out_file: "/home/deploy/hoang_app/logs/web.out.log", | |
| // Options reference: https://pm2.io/doc/en/runtime/reference/ecosystem-file/ | |
| args: "start", |
| // build/build.js | |
| // Replace | |
| process.env.NODE_ENV = 'production' | |
| // with | |
| process.env.NODE_ENV = process.argv[2] || 'production' | |
| // Replace | |
| const spinner = ora('building for production...') | |
| // with | |
| const spinner = ora(`building for ${process.env.NODE_ENV}...`) |
| # For nuxt or next app with node server running on 8000 | |
| server { | |
| listen 80; | |
| server_name 212.83.163.175; | |
| server_name #domain name; | |
| root /home/deploy/app; | |
| access_log /home/deploy/app/logs/nginx_access.log; | |
| error_log /home/deploy/app/logs/nginx_error.log; | |
| try_files $uri $uri/ /index.html; |