Last active
May 30, 2023 15:52
-
-
Save BananaAcid/7dc7852f01e20c03fb97f58908218949 to your computer and use it in GitHub Desktop.
package json commands for dokku and deployment
This file contains 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
{ | |
"name": "project_abc", | |
"private": true, | |
"config": { | |
"host": "hosting.server.tld", | |
"domain": "abc-project.tld" | |
}, | |
"scripts": { | |
"local:createSshKey": "ssh-keygen -t rsa", | |
"dokku:addLocalUserSsh": "cat ~/.ssh/id_rsa.pub | ssh root@$npm_package_config_host \"cat - >> /root/.ssh/authorized_keys\" && cat ~/.ssh/id_rsa.pub | ssh root@$npm_package_config_host \"sudo sshcommand acl-add dokku $USER\"", | |
"dokku:link": "git remote add dokku dokku@$npm_package_config_host:$npm_package_name", | |
"--": "", | |
"dokku:create-app": "ssh root@$npm_package_config_host \"dokku apps:create $npm_package_name && dokku letsencrypt:enable $npm_package_name && dokku builder-dockerfile:set $npm_package_name dockerfile-path docker/Dockerfile && dokku redis:create $npm_package_name-session-db && dokku redis:link $npm_package_name-session-db $npm_package_name && dokku domains:set $npm_package_name $npm_package_config_domain \"", | |
"dokku:create-bindings": "ssh root@$npm_package_config_host \"dokku storage:mount $npm_package_name $npm_package_name-config:/app/config && dokku storage:mount $npm_package_name $npm_package_name-data:/app/data\"", | |
"---": "", | |
"dokku:volumes-ls": "ssh root@$npm_package_config_host \"dokku storage:list $npm_package_name\"", | |
"----": "", | |
"dokku:push": "git push dokku master:master", | |
"-----": "" | |
} | |
} |
This file contains 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
{ | |
"name": "nuxt-app", | |
"private": true, | |
"scripts": { | |
"start": "cd ./.output/server && node ./index.mjs", | |
"start:test-chain": "npm run build && cd ./.output/server && node ./index.mjs", | |
"build": "npm install && npm run updates:check && nuxt build", | |
"dev": "nuxt dev", | |
"preview": "nuxt preview", | |
"postinstall": "./node_modules/.bin/nuxt prepare", | |
"clean": "nuxt clean", | |
"updates:check": "ncu", | |
"updates:do": "ncu -u" | |
}, | |
"devDependencies": { | |
"@types/node": "^20" | |
}, | |
"dependencies": { | |
"less": "^4.1.3", | |
"npm-check-updates": "^16.10.12", | |
"nuxt": "^3.4.3", | |
"pug": "^3.0.2" | |
} | |
} |
This file contains 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
{ | |
"scripts": { | |
"dokku": { | |
"predeploy": "cd app && npm run build" | |
} | |
} | |
} |
This file contains 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
{ | |
"name": "project_abc", | |
"private": true, | |
"config": { | |
"host": "hosting.server.tld", | |
"domain": "abc-project.tld" | |
}, | |
"version": "1.0.0", | |
"license": "ISC", | |
"engines": { | |
"node": "^19.0" | |
}, | |
"author": { | |
"name": "Author Name" | |
}, | |
"scripts": { | |
"start": "cd app && PORT=5000 npm run start", | |
"-": "", | |
"local:createSshKey": "ssh-keygen -t rsa", | |
"dokku:addLocalUserSsh": "cat ~/.ssh/id_rsa.pub | ssh root@$npm_package_config_host \"cat - >> /root/.ssh/authorized_keys\" && cat ~/.ssh/id_rsa.pub | ssh root@$npm_package_config_host \"sudo sshcommand acl-add dokku $USER\"", | |
"dokku:link": "git remote add dokku dokku@$npm_package_config_host:$npm_package_name", | |
"--": "", | |
"dokku:create-app": "ssh root@$npm_package_config_host \"dokku apps:create $npm_package_name && dokku letsencrypt:enable $npm_package_name && dokku domains:set $npm_package_name $npm_package_config_domain \"", | |
"dokku:create-bindings": "ssh root@$npm_package_config_host \"dokku storage:mount $npm_package_name $npm_package_name-config:/app/config && dokku storage:mount $npm_package_name $npm_package_name-data:/app/data\"", | |
"---": "", | |
"dokku:volumes-ls": "ssh root@$npm_package_config_host \"dokku storage:list $npm_package_name\"", | |
"----": "", | |
"dokku:push": "git push dokku master:master", | |
"-----": "", | |
"dokku:ssh-to-server": "ssh root@$npm_package_config_host", | |
"------": "" | |
} | |
} |
This file contains 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
web: npm run start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment