Compare commits

...
Sign in to create a new pull request.

26 commits

Author SHA1 Message Date
Collin Duncan
ed05a330f6
updating deploy to include GIT_COMMIT as env var
All checks were successful
ci/woodpecker/push/test-and-deploy Pipeline was successful
2025-04-29 10:46:23 +02:00
Collin Duncan
543a8c4ada
adding ecosystem config file to post-deploy step
All checks were successful
ci/woodpecker/push/test-and-deploy Pipeline was successful
2025-04-29 10:22:23 +02:00
Collin Duncan
be0a32c8eb
using name argument
Some checks failed
ci/woodpecker/push/test-and-deploy Pipeline failed
2025-04-29 09:56:19 +02:00
Collin Duncan
21495eea58
Changing where the deploy action comes from
Some checks failed
ci/woodpecker/push/test-and-deploy Pipeline failed
2025-04-29 09:41:23 +02:00
Collin Duncan
42da932301
changing start to startOrRestart
Some checks failed
ci/woodpecker/push/test-and-deploy Pipeline failed
2025-04-29 09:15:28 +02:00
a78444749c Updating deploy script and cicd name
Some checks failed
ci/woodpecker/push/test-and-deploy Pipeline failed
2025-04-28 21:45:07 +02:00
Collin Duncan
d84c23bdeb
changing host back to autobaan
All checks were successful
ci/woodpecker/push/test Pipeline was successful
2025-04-28 17:12:04 +02:00
Collin Duncan
14ba6363ee
tmp
Some checks failed
ci/woodpecker/push/test Pipeline failed
2025-04-28 17:09:24 +02:00
Collin Duncan
8863a9d052
adding origin to ref
Some checks failed
ci/woodpecker/push/test Pipeline failed
2025-04-28 16:48:31 +02:00
Collin Duncan
430f73d63b
Testing correct ref and removing old ssh check
Some checks failed
ci/woodpecker/push/test Pipeline failed
2025-04-28 16:30:08 +02:00
Collin Duncan
b1558b518a
using non-slim image
Some checks failed
ci/woodpecker/push/test Pipeline failed
2025-04-28 16:13:29 +02:00
Collin Duncan
691deb7765
adding deploy step
Some checks failed
ci/woodpecker/push/test Pipeline failed
2025-04-28 13:58:51 +02:00
Collin Duncan
93bcc887b9
updating pm2 ecosystem config
All checks were successful
ci/woodpecker/push/test Pipeline was successful
2025-04-28 13:54:37 +02:00
Collin Duncan
0ac1644eb1
Adding pm2 ecosystem and deploy config
All checks were successful
ci/woodpecker/push/test Pipeline was successful
2025-04-28 13:45:11 +02:00
Collin Duncan
eff0e5849e
using config on server for ssh known hosts
All checks were successful
ci/woodpecker/push/test Pipeline was successful
2025-04-24 14:39:57 +02:00
Collin Duncan
7bc95a8217
testing network addresses
Some checks failed
ci/woodpecker/push/test Pipeline failed
2025-04-24 14:24:28 +02:00
Collin Duncan
2fb73310b1
testing some bullshit
Some checks failed
ci/woodpecker/push/test Pipeline failed
2025-04-24 14:22:06 +02:00
Collin Duncan
e2b420ef56
changing to use volumes instead of secrets
Some checks failed
ci/woodpecker/manual/test Pipeline failed
2025-04-24 13:47:36 +02:00
Collin Duncan
e3c91dd5c6
fixing typo in manual trigger
Some checks failed
ci/woodpecker/push/test Pipeline failed
2025-04-24 13:33:20 +02:00
Collin Duncan
05f63fe6c2
adding manual trigger 2025-04-24 13:32:54 +02:00
Collin Duncan
aaf9cfde1f
getting ssh key from secrets 2025-04-24 13:31:04 +02:00
Collin Duncan
3ca68c5841
changing image for deploy step
Some checks failed
ci/woodpecker/push/test Pipeline failed
2025-04-24 13:12:55 +02:00
Collin Duncan
78b2334e4b
Removing branch
Some checks failed
ci/woodpecker/push/test Pipeline failed
2025-04-24 11:52:29 +02:00
Collin Duncan
1945b0dd40
Updating branch to all branches 2025-04-24 11:51:55 +02:00
Collin Duncan
cd613af872
Updating image 2025-04-24 11:47:01 +02:00
Collin Duncan
93ec1fb4db
Adding new step for woodpecker-cicd to ssh into autobaan container 2025-04-24 11:46:08 +02:00
5 changed files with 13542 additions and 12392 deletions

View file

@ -0,0 +1,13 @@
when:
- event: push
- event: manual
steps:
- name: test-and-deploy
image: docker.io/node:hydrogen
volumes:
- /etc/ssh:/etc/ssh
commands:
- npm ci
- npm run test:unit
- npm run deploy

View file

@ -1,10 +0,0 @@
when:
- branch: main
event: push
steps:
- name: test
image: docker.io/node:hydrogen-slim
commands:
- npm ci
- npm run test:unit

20
ecosystem.config.js Normal file
View file

@ -0,0 +1,20 @@
module.exports = {
apps: [
{
name: 'autobaan',
script: 'npm',
args: 'run start',
},
],
deploy: {
production: {
user: 'root',
host: ['autobaan'],
ref: 'origin/deploy_test',
repo: 'https://fred.collinduncan.com/collin/autobaan.git',
path: '/root/autobaan',
'post-deploy':
'npm install && GIT_COMMIT=$(git show -s --format=%h) pm2 startOrRestart ecosystem.config.js --name autobaan --update-env',
},
},
}

25713
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,90 +1,92 @@
{
"name": "autobaan",
"version": "0.0.1",
"description": "",
"author": "",
"private": true,
"license": "UNLICENSED",
"scripts": {
"build": "nest build",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"prestart": "npm run migrations",
"start": "nest start",
"prestart:dev": "npm run migrations",
"start:dev": "nest start --watch",
"start:debug": "nest start --debug --watch",
"start:prod": "node dist/main",
"repl": "npm run start -- --entryFile repl",
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
"test:e2e": "jest --config ./test/jest-e2e.json",
"test:unit": "jest --config ./test/jest-unit.json",
"migrations:generate": "npx typeorm-ts-node-commonjs migration:generate -d data-source.ts database/migrations/$npm_config_name",
"migrations": "npx typeorm-ts-node-commonjs migration:run -d data-source.ts"
},
"dependencies": {
"@nestjs/bull": "^0.6.3",
"@nestjs/cli": "^9.0.0",
"@nestjs/common": "^9.0.0",
"@nestjs/config": "^2.3.4",
"@nestjs/core": "^9.0.0",
"@nestjs/platform-express": "^9.0.0",
"@nestjs/schedule": "^2.2.2",
"@nestjs/typeorm": "^9.0.1",
"axios": "^1.5.0",
"bull": "^4.10.4",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.0",
"dayjs": "^1.11.7",
"imap": "^0.8.19",
"mailparser-mit": "^1.0.0",
"puppeteer": "^20.4.0",
"reflect-metadata": "^0.1.13",
"rxjs": "^7.2.0",
"sqlite3": "^5.1.6",
"typeorm": "^0.3.17"
},
"devDependencies": {
"@nestjs/schematics": "^9.0.0",
"@nestjs/testing": "^9.0.0",
"@types/cron": "^2.0.1",
"@types/express": "^4.17.13",
"@types/imap": "^0.8.37",
"@types/jest": "29.5.1",
"@types/mailparser-mit": "^1.0.1",
"@types/node": "18.16.12",
"@types/puppeteer": "^7.0.4",
"@types/supertest": "^2.0.11",
"@typescript-eslint/eslint-plugin": "^5.0.0",
"@typescript-eslint/parser": "^5.0.0",
"eslint": "^8.0.1",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-simple-import-sort": "^10.0.0",
"jest": "29.5.0",
"prettier": "^2.3.2",
"source-map-support": "^0.5.20",
"supertest": "^6.1.3",
"ts-jest": "29.1.0",
"ts-loader": "^9.2.3",
"ts-node": "^10.0.0",
"tsconfig-paths": "4.2.0",
"typescript": "^5.0.0"
},
"jest": {
"moduleFileExtensions": [
"js",
"json",
"ts"
],
"rootDir": "test",
"testRegex": ".*\\.spec\\.ts$",
"transform": {
"^.+\\.(t|j)s$": "ts-jest"
},
"collectCoverageFrom": [
"**/*.(t|j)s"
],
"coverageDirectory": "../coverage",
"testEnvironment": "node"
}
"name": "autobaan",
"version": "0.0.1",
"description": "",
"author": "",
"private": true,
"license": "UNLICENSED",
"scripts": {
"build": "nest build",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"prestart": "npm run migrations",
"start": "nest start",
"prestart:dev": "npm run migrations",
"start:dev": "nest start --watch",
"start:debug": "nest start --debug --watch",
"start:prod": "node dist/main",
"repl": "npm run start -- --entryFile repl",
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
"test:e2e": "jest --config ./test/jest-e2e.json",
"test:unit": "jest --config ./test/jest-unit.json",
"migrations:generate": "npx typeorm-ts-node-commonjs migration:generate -d data-source.ts database/migrations/$npm_config_name",
"migrations": "npx typeorm-ts-node-commonjs migration:run -d data-source.ts",
"deploy": "pm2 deploy production"
},
"dependencies": {
"@nestjs/bull": "^0.6.3",
"@nestjs/cli": "^9.0.0",
"@nestjs/common": "^9.0.0",
"@nestjs/config": "^2.3.4",
"@nestjs/core": "^9.0.0",
"@nestjs/platform-express": "^9.0.0",
"@nestjs/schedule": "^2.2.2",
"@nestjs/typeorm": "^9.0.1",
"axios": "^1.5.0",
"bull": "^4.10.4",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.0",
"dayjs": "^1.11.7",
"imap": "^0.8.19",
"mailparser-mit": "^1.0.0",
"puppeteer": "^20.4.0",
"reflect-metadata": "^0.1.13",
"rxjs": "^7.2.0",
"sqlite3": "^5.1.6",
"typeorm": "^0.3.17"
},
"devDependencies": {
"@nestjs/schematics": "^9.0.0",
"@nestjs/testing": "^9.0.0",
"@types/cron": "^2.0.1",
"@types/express": "^4.17.13",
"@types/imap": "^0.8.37",
"@types/jest": "29.5.1",
"@types/mailparser-mit": "^1.0.1",
"@types/node": "18.16.12",
"@types/puppeteer": "^7.0.4",
"@types/supertest": "^2.0.11",
"@typescript-eslint/eslint-plugin": "^5.0.0",
"@typescript-eslint/parser": "^5.0.0",
"eslint": "^8.0.1",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-simple-import-sort": "^10.0.0",
"jest": "29.5.0",
"pm2": "^6.0.5",
"prettier": "^2.3.2",
"source-map-support": "^0.5.20",
"supertest": "^6.1.3",
"ts-jest": "29.1.0",
"ts-loader": "^9.2.3",
"ts-node": "^10.0.0",
"tsconfig-paths": "4.2.0",
"typescript": "^5.0.0"
},
"jest": {
"moduleFileExtensions": [
"js",
"json",
"ts"
],
"rootDir": "test",
"testRegex": ".*\\.spec\\.ts$",
"transform": {
"^.+\\.(t|j)s$": "ts-jest"
},
"collectCoverageFrom": [
"**/*.(t|j)s"
],
"coverageDirectory": "../coverage",
"testEnvironment": "node"
}
}