chore: update deployment configuration, project readme, and enhance project metadata to take advantage of template repos
This commit is contained in:
16
README.md
16
README.md
@ -5,15 +5,15 @@ vue ts + vite frontend, express backend, with a dockerfile and a deploy script t
|
||||
### steps to get started on the dokku side
|
||||
1. create a dokku app
|
||||
```bash
|
||||
dokku apps:create <app-name>
|
||||
dokku apps:create $REPO_NAME
|
||||
```
|
||||
2. create postgres database
|
||||
```bash
|
||||
dokku postgres:create <db-name>
|
||||
dokku postgres:create ${REPO_NAME}-db
|
||||
```
|
||||
3. link the database to the app
|
||||
```bash
|
||||
dokku postgres:link <db-name> <app-name>
|
||||
dokku postgres:link ${REPO_NAME}-db $REPO_NAME
|
||||
```
|
||||
4. setup db if applicable
|
||||
- dump local db
|
||||
@ -22,30 +22,30 @@ vue ts + vite frontend, express backend, with a dockerfile and a deploy script t
|
||||
```
|
||||
- restore to dokku db
|
||||
```bash
|
||||
dokku postgres:import <db-name> < db.dump
|
||||
dokku postgres:import ${REPO_NAME}-db < db.dump
|
||||
```
|
||||
5. set app to use nginx
|
||||
- set proxy to nginx
|
||||
```bash
|
||||
dokku proxy:set <app-name> nginx
|
||||
dokku proxy:set $REPO_NAME nginx
|
||||
```
|
||||
|
||||
- map nginx port to internal docker port
|
||||
```bash
|
||||
dokku ports:add <app-name> <scheme>:<nginx-port>:<internal-docker-port>
|
||||
dokku ports:add $REPO_NAME <scheme>:<nginx-port>:<internal-docker-port>
|
||||
```
|
||||
6. set repo dokku deploy key
|
||||
- copy the private key from dokku into the repo secrets under the name `DOKKU_DEPLOY_KEY`
|
||||
7. add the public key to known hosts on dokku
|
||||
```bash
|
||||
dokku ssh-keys:add <app-name> <path-to-public-key>
|
||||
dokku ssh-keys:add $REPO_NAME <path-to-public-key>
|
||||
```
|
||||
8. set environment variables
|
||||
- create a `.env` file on the dokku server
|
||||
- add the variables to the `.env` file
|
||||
- add the variables to the app
|
||||
```bash
|
||||
cat .env | xargs dokku config:set --no-restart <app-name>
|
||||
cat .env | xargs dokku config:set --no-restart $REPO_NAME
|
||||
```
|
||||
it should be ready to go now, you can deploy with the deployment script
|
||||
|
||||
Reference in New Issue
Block a user