chore: update deployment configuration, project readme, and enhance project metadata to take advantage of template repos

This commit is contained in:
Ari Yeger
2025-07-24 17:40:03 -04:00
parent bb0a3a411b
commit 8bc6658e57
6 changed files with 76 additions and 66 deletions

7
.gitea/template Normal file
View File

@ -0,0 +1,7 @@
**/package.json
.gitea/workflows/*.yml
**.html
**.md

View File

@ -18,6 +18,5 @@ jobs:
- name: Push to dokku - name: Push to dokku
uses: dokku/github-action@master uses: dokku/github-action@master
with: with:
# TODO: set the dokku app name git_remote_url: 'ssh://dokku@192.168.1.2:22/$REPO_NAME'
git_remote_url: 'ssh://dokku@192.168.1.2:22/website-template'
ssh_private_key: ${{ secrets.DOKKU_DEPLOY_KEY }} ssh_private_key: ${{ secrets.DOKKU_DEPLOY_KEY }}

View File

@ -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 ### steps to get started on the dokku side
1. create a dokku app 1. create a dokku app
```bash ```bash
dokku apps:create <app-name> dokku apps:create $REPO_NAME
``` ```
2. create postgres database 2. create postgres database
```bash ```bash
dokku postgres:create <db-name> dokku postgres:create ${REPO_NAME}-db
``` ```
3. link the database to the app 3. link the database to the app
```bash ```bash
dokku postgres:link <db-name> <app-name> dokku postgres:link ${REPO_NAME}-db $REPO_NAME
``` ```
4. setup db if applicable 4. setup db if applicable
- dump local db - 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 - restore to dokku db
```bash ```bash
dokku postgres:import <db-name> < db.dump dokku postgres:import ${REPO_NAME}-db < db.dump
``` ```
5. set app to use nginx 5. set app to use nginx
- set proxy to nginx - set proxy to nginx
```bash ```bash
dokku proxy:set <app-name> nginx dokku proxy:set $REPO_NAME nginx
``` ```
- map nginx port to internal docker port - map nginx port to internal docker port
```bash ```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 6. 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 `DOKKU_DEPLOY_KEY`
7. add the public key to known hosts on dokku 7. add the public key to known hosts on dokku
```bash ```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 8. set environment variables
- create a `.env` file on the dokku server - create a `.env` file on the dokku server
- add the variables to the `.env` file - add the variables to the `.env` file
- add the variables to the app - add the variables to the app
```bash ```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 it should be ready to go now, you can deploy with the deployment script

View File

@ -4,7 +4,7 @@
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<link rel="icon" type="image/png" href="/src/assets/img/L10n.png" /> <link rel="icon" type="image/png" href="/src/assets/img/L10n.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Website Template</title> <title>$REPO_NAME</title>
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>

View File

@ -3,6 +3,8 @@
"private": true, "private": true,
"version": "0.0.0", "version": "0.0.0",
"type": "module", "type": "module",
"description": "Client application for $REPO_NAME",
"author": "$REPO_OWNER",
"scripts": { "scripts": {
"dev": "npm-run-all --parallel dev:client dev:server", "dev": "npm-run-all --parallel dev:client dev:server",
"dev:server": "cd ../server && npm run dev", "dev:server": "cd ../server && npm run dev",

View File

@ -3,6 +3,8 @@
"version": "0.1.0", "version": "0.1.0",
"private": false, "private": false,
"type": "module", "type": "module",
"description": "Server application for $REPO_NAME",
"author": "$REPO_OWNER",
"scripts": { "scripts": {
"dev": "nodemon app.js", "dev": "nodemon app.js",
"start": "node app.js" "start": "node app.js"