chore: update deployment configuration, project readme, and enhance project metadata to take advantage of template repos
This commit is contained in:
7
.gitea/template
Normal file
7
.gitea/template
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
**/package.json
|
||||||
|
|
||||||
|
.gitea/workflows/*.yml
|
||||||
|
|
||||||
|
**.html
|
||||||
|
|
||||||
|
**.md
|
||||||
@ -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 }}
|
||||||
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
|
### 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
|
||||||
|
|
||||||
@ -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>
|
||||||
|
|||||||
@ -1,33 +1,35 @@
|
|||||||
{
|
{
|
||||||
"name": "client",
|
"name": "client",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"description": "Client application for $REPO_NAME",
|
||||||
"dev": "npm-run-all --parallel dev:client dev:server",
|
"author": "$REPO_OWNER",
|
||||||
"dev:server": "cd ../server && npm run dev",
|
"scripts": {
|
||||||
"dev:client": "vite",
|
"dev": "npm-run-all --parallel dev:client dev:server",
|
||||||
"prod": "cd ../server && npm run start",
|
"dev:server": "cd ../server && npm run dev",
|
||||||
"build": "run-p build:vue build:sass",
|
"dev:client": "vite",
|
||||||
"build:vue": "vue-tsc -b && vite build",
|
"prod": "cd ../server && npm run start",
|
||||||
"build:sass": "sass src/assets/css/base.scss src/assets/css/base.css && sass src/assets/css/main.scss src/assets/css/main.css",
|
"build": "run-p build:vue build:sass",
|
||||||
"preview": "vite preview"
|
"build:vue": "vue-tsc -b && vite build",
|
||||||
},
|
"build:sass": "sass src/assets/css/base.scss src/assets/css/base.css && sass src/assets/css/main.scss src/assets/css/main.css",
|
||||||
"dependencies": {
|
"preview": "vite preview"
|
||||||
"jwt-decode": "^4.0.0",
|
},
|
||||||
"vue": "^3.5.17",
|
"dependencies": {
|
||||||
"vue-router": "^4.5.1",
|
"jwt-decode": "^4.0.0",
|
||||||
"vue-toast-notification": "^3.1.3"
|
"vue": "^3.5.17",
|
||||||
},
|
"vue-router": "^4.5.1",
|
||||||
"devDependencies": {
|
"vue-toast-notification": "^3.1.3"
|
||||||
"@types/node": "^24.0.10",
|
},
|
||||||
"@vitejs/plugin-vue": "^6.0.0",
|
"devDependencies": {
|
||||||
"@vue/tsconfig": "^0.7.0",
|
"@types/node": "^24.0.10",
|
||||||
"bootstrap": "^5.3.3",
|
"@vitejs/plugin-vue": "^6.0.0",
|
||||||
"npm-run-all2": "^7.0.2",
|
"@vue/tsconfig": "^0.7.0",
|
||||||
"sass": "^1.89.2",
|
"bootstrap": "^5.3.3",
|
||||||
"typescript": "~5.8.3",
|
"npm-run-all2": "^7.0.2",
|
||||||
"vite": "^7.0.4",
|
"sass": "^1.89.2",
|
||||||
"vue-tsc": "^2.2.12"
|
"typescript": "~5.8.3",
|
||||||
}
|
"vite": "^7.0.4",
|
||||||
|
"vue-tsc": "^2.2.12"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,26 +1,28 @@
|
|||||||
{
|
{
|
||||||
"name": "server",
|
"name": "server",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"private": false,
|
"private": false,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"description": "Server application for $REPO_NAME",
|
||||||
"dev": "nodemon app.js",
|
"author": "$REPO_OWNER",
|
||||||
"start": "node app.js"
|
"scripts": {
|
||||||
},
|
"dev": "nodemon app.js",
|
||||||
"dependencies": {
|
"start": "node app.js"
|
||||||
"bcryptjs": "^3.0.2",
|
},
|
||||||
"cors": "^2.8.5",
|
"dependencies": {
|
||||||
"dotenv": "^16.5.0",
|
"bcryptjs": "^3.0.2",
|
||||||
"express": "^4.18.2",
|
"cors": "^2.8.5",
|
||||||
"jsonwebtoken": "^9.0.2",
|
"dotenv": "^16.5.0",
|
||||||
"multer": "^2.0.1",
|
"express": "^4.18.2",
|
||||||
"nodemailer": "^7.0.5",
|
"jsonwebtoken": "^9.0.2",
|
||||||
"pg": "^8.16.3"
|
"multer": "^2.0.1",
|
||||||
},
|
"nodemailer": "^7.0.5",
|
||||||
"devDependencies": {
|
"pg": "^8.16.3"
|
||||||
"@types/express": "^5.0.3",
|
},
|
||||||
"@types/nodemailer": "^6.4.7",
|
"devDependencies": {
|
||||||
"jsdoc": "^4.0.4",
|
"@types/express": "^5.0.3",
|
||||||
"nodemon": "^3.1.10"
|
"@types/nodemailer": "^6.4.7",
|
||||||
}
|
"jsdoc": "^4.0.4",
|
||||||
|
"nodemon": "^3.1.10"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user