fix: escape the deploy key var from being replaced
Website-template
vue ts + vite frontend, express backend, with a dockerfile and a deploy script to my dokku
steps to get started on the dokku side
-
create a dokku app
dokku apps:create $REPO_NAME -
create postgres database
dokku postgres:create ${REPO_NAME}-db -
link the database to the app
dokku postgres:link ${REPO_NAME}-db $REPO_NAME -
setup db if applicable
- dump local db
pg_dump -Fc --no-acl --no-owner -h localhost -U <db-user> <db-name> > db.dump- restore to dokku db
dokku postgres:import ${REPO_NAME}-db < db.dump -
set app to use nginx
- set proxy to nginx
dokku proxy:set $REPO_NAME nginx- map nginx port to internal docker port
dokku ports:add $REPO_NAME <scheme>:<nginx-port>:<internal-docker-port> -
set repo dokku deploy key
- copy the private key from dokku into the repo secrets under the name
DOKKU_DEPLOY_KEY
- copy the private key from dokku into the repo secrets under the name
-
add the public key to known hosts on dokku
dokku ssh-keys:add $REPO_NAME <path-to-public-key> -
set environment variables
- create a
.envfile on the dokku server - add the variables to the
.envfile - add the variables to the app
cat .env | xargs dokku config:set --no-restart $REPO_NAME - create a
it should be ready to go now, you can deploy with the deployment script
Languages
Vue
36.1%
JavaScript
29.5%
TypeScript
17.5%
SCSS
13.4%
CSS
2%
Other
1.5%