Compare commits

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

1 commit

Author SHA1 Message Date
a6fb5f35b6
Migrating to self-hosted solution for cicd and deployments
Some checks failed
ci/woodpecker/push/test-and-deploy Pipeline was successful
Push to main / test (push) Has been cancelled
Push to main / build-image (push) Has been cancelled
2025-04-29 11:24:20 +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',
},
},
}

1169
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -19,7 +19,8 @@
"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"
"migrations": "npx typeorm-ts-node-commonjs migration:run -d data-source.ts",
"deploy": "pm2 deploy production"
},
"dependencies": {
"@nestjs/bull": "^0.6.3",
@ -61,6 +62,7 @@
"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",