diff --git a/.gitea/template b/.gitea/template new file mode 100644 index 0000000..af6f6fb --- /dev/null +++ b/.gitea/template @@ -0,0 +1,7 @@ +**/package.json + +.gitea/workflows/*.yml + +**.html + +**.md \ No newline at end of file diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 6170c41..f62340e 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -18,6 +18,5 @@ jobs: - name: Push to dokku uses: dokku/github-action@master with: - # TODO: set the dokku app name - git_remote_url: 'ssh://dokku@192.168.1.2:22/website-template' + git_remote_url: 'ssh://dokku@192.168.1.2:22/$REPO_NAME' ssh_private_key: ${{ secrets.DOKKU_DEPLOY_KEY }} \ No newline at end of file diff --git a/README.md b/README.md index dab1d42..b044230 100644 --- a/README.md +++ b/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 + dokku apps:create $REPO_NAME ``` 2. create postgres database ```bash - dokku postgres:create + dokku postgres:create ${REPO_NAME}-db ``` 3. link the database to the app ```bash - dokku postgres:link + 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.dump + dokku postgres:import ${REPO_NAME}-db < db.dump ``` 5. set app to use nginx - set proxy to nginx ```bash - dokku proxy:set nginx + dokku proxy:set $REPO_NAME nginx ``` - map nginx port to internal docker port ```bash - dokku ports:add :: + dokku ports:add $REPO_NAME :: ``` 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 + dokku ssh-keys:add $REPO_NAME ``` 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 + cat .env | xargs dokku config:set --no-restart $REPO_NAME ``` it should be ready to go now, you can deploy with the deployment script \ No newline at end of file diff --git a/client/index.html b/client/index.html index 07367cf..0d34f16 100644 --- a/client/index.html +++ b/client/index.html @@ -4,7 +4,7 @@ - Website Template + $REPO_NAME
diff --git a/client/package.json b/client/package.json index 4610328..a001640 100644 --- a/client/package.json +++ b/client/package.json @@ -1,33 +1,35 @@ { - "name": "client", - "private": true, - "version": "0.0.0", - "type": "module", - "scripts": { - "dev": "npm-run-all --parallel dev:client dev:server", - "dev:server": "cd ../server && npm run dev", - "dev:client": "vite", - "prod": "cd ../server && npm run start", - "build": "run-p build:vue build:sass", - "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", - "preview": "vite preview" - }, - "dependencies": { - "jwt-decode": "^4.0.0", - "vue": "^3.5.17", - "vue-router": "^4.5.1", - "vue-toast-notification": "^3.1.3" - }, - "devDependencies": { - "@types/node": "^24.0.10", - "@vitejs/plugin-vue": "^6.0.0", - "@vue/tsconfig": "^0.7.0", - "bootstrap": "^5.3.3", - "npm-run-all2": "^7.0.2", - "sass": "^1.89.2", - "typescript": "~5.8.3", - "vite": "^7.0.4", - "vue-tsc": "^2.2.12" - } + "name": "client", + "private": true, + "version": "0.0.0", + "type": "module", + "description": "Client application for $REPO_NAME", + "author": "$REPO_OWNER", + "scripts": { + "dev": "npm-run-all --parallel dev:client dev:server", + "dev:server": "cd ../server && npm run dev", + "dev:client": "vite", + "prod": "cd ../server && npm run start", + "build": "run-p build:vue build:sass", + "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", + "preview": "vite preview" + }, + "dependencies": { + "jwt-decode": "^4.0.0", + "vue": "^3.5.17", + "vue-router": "^4.5.1", + "vue-toast-notification": "^3.1.3" + }, + "devDependencies": { + "@types/node": "^24.0.10", + "@vitejs/plugin-vue": "^6.0.0", + "@vue/tsconfig": "^0.7.0", + "bootstrap": "^5.3.3", + "npm-run-all2": "^7.0.2", + "sass": "^1.89.2", + "typescript": "~5.8.3", + "vite": "^7.0.4", + "vue-tsc": "^2.2.12" + } } diff --git a/server/package.json b/server/package.json index 94944a2..654c912 100644 --- a/server/package.json +++ b/server/package.json @@ -1,26 +1,28 @@ { - "name": "server", - "version": "0.1.0", - "private": false, - "type": "module", - "scripts": { - "dev": "nodemon app.js", - "start": "node app.js" - }, - "dependencies": { - "bcryptjs": "^3.0.2", - "cors": "^2.8.5", - "dotenv": "^16.5.0", - "express": "^4.18.2", - "jsonwebtoken": "^9.0.2", - "multer": "^2.0.1", - "nodemailer": "^7.0.5", - "pg": "^8.16.3" - }, - "devDependencies": { - "@types/express": "^5.0.3", - "@types/nodemailer": "^6.4.7", - "jsdoc": "^4.0.4", - "nodemon": "^3.1.10" - } + "name": "server", + "version": "0.1.0", + "private": false, + "type": "module", + "description": "Server application for $REPO_NAME", + "author": "$REPO_OWNER", + "scripts": { + "dev": "nodemon app.js", + "start": "node app.js" + }, + "dependencies": { + "bcryptjs": "^3.0.2", + "cors": "^2.8.5", + "dotenv": "^16.5.0", + "express": "^4.18.2", + "jsonwebtoken": "^9.0.2", + "multer": "^2.0.1", + "nodemailer": "^7.0.5", + "pg": "^8.16.3" + }, + "devDependencies": { + "@types/express": "^5.0.3", + "@types/nodemailer": "^6.4.7", + "jsdoc": "^4.0.4", + "nodemon": "^3.1.10" + } }