add test setup

This commit is contained in:
Simon Larsen 2023-07-19 12:25:50 +01:00
parent 5728c1a18c
commit 3dea88a97b
No known key found for this signature in database
GPG Key ID: AB45983AA9C81CDE
2 changed files with 11 additions and 12 deletions

View File

@ -6,4 +6,4 @@ cd ..
# Run Preinstall.
npm run prerun
# Run Postgres
npm run read-env | docker compose up -f docker-compose.dev.yml -e -d postgres
export $(grep -v '^#' config.env | xargs) && docker compose up -f docker-compose.dev.yml -e -d postgres

View File

@ -41,27 +41,26 @@
"prerun": "bash configure.sh",
"typeorm": "node --require ts-node/register ./node_modules/typeorm/cli.js",
"uninstall": "bash uninstall.sh",
"read-env": "sudo grep -v '^#' config.env | xargs",
"lint": "ejslint **/*.ejs && eslint '**/*.ts*' -c .eslintrc.json --ignore-path .eslintignore ",
"fix-lint": " node --max_old_space_size=18192 ./node_modules/.bin/eslint '**/*.ts*' -c .eslintrc.json --ignore-path .eslintignore --fix ",
"fix": "npm run fix-lint",
"start": "sudo npm run read-env | sudo docker compose up --remove-orphans -d $npm_config_services",
"start": "export $(grep -v '^#' config.env | xargs) && docker compose up --remove-orphans -d $npm_config_services",
"ps": "sudo docker compose ps",
"save-logs": "sudo docker compose logs --tail=100000 $npm_config_services > logs.txt",
"logs": "sudo docker compose logs --tail=100 -f $npm_config_services",
"write-logs": "sudo docker compose logs -f $npm_config_services > logs.txt",
"build": "sudo docker compose build -f docker-compose.dev.yml $npm_config_services",
"force-build": "sudo docker compose build -f docker-compose.dev.yml --no-cache $npm_config_services",
"save-logs": "docker compose logs --tail=100000 $npm_config_services > logs.txt",
"logs": "docker compose logs --tail=100 -f $npm_config_services",
"write-logs": "docker compose logs -f $npm_config_services > logs.txt",
"build": "docker compose build -f docker-compose.dev.yml $npm_config_services",
"force-build": "docker compose build -f docker-compose.dev.yml --no-cache $npm_config_services",
"force-build-dev": "npm run config-to-dev && npm run force-build",
"kill": "npm run stop",
"prod": "sudo npm run read-env | docker compose up -f docker-compose.yml -d",
"dev": "sudo npm run read-env | sudo docker compose up --remove-orphans -f docker-compose.dev.yml -d $npm_config_services",
"prod": "export $(grep -v '^#' config.env | xargs) && docker compose up -f docker-compose.yml -d",
"dev": "export $(grep -v '^#' config.env | xargs) && docker compose up --remove-orphans -f docker-compose.dev.yml -d $npm_config_services",
"stop": "docker compose down --remove-orphans",
"prune": "docker system prune",
"remove-all-containers": "docker stop $(docker ps -a -q) && docker rm $(docker ps -a -q) || echo 'No running containers'",
"prepare": "husky install",
"backup": "sudo bash backup.sh",
"update": "npm run prerun && sudo docker compose pull && npm run start"
"backup": "bash backup.sh",
"update": "npm run prerun && docker compose pull && npm run start"
},
"repository": {
"type": "git",