Skip to content
Snippets Groups Projects
Unverified Commit 70fc35ec authored by BITARD Michaël's avatar BITARD Michaël Committed by GitHub
Browse files

fix(build): l'api fonctionne à nouveau (#245)

parent 4b3ce179
No related branches found
No related tags found
No related merge requests found
......@@ -4,4 +4,5 @@ dist
**/dist
Dockerfile*
.env
docker-compose*
\ No newline at end of file
docker-compose*
infra/cd/.cargo_docker
......@@ -32,7 +32,7 @@ COPY --chown=nonroot:nonroot --from=build-stage /app/packages/api/package.json .
COPY --chown=nonroot:nonroot --from=build-stage /app/packages/common/package.json ./packages/common/
COPY --chown=nonroot:nonroot --from=build-stage /app/packages/api/dist/ ./packages/api/dist/
COPY --chown=nonroot:nonroot --from=build-stage /app/node_modules ./node_modules/
COPY --chown=nonroot:nonroot --from=build-stage /app/packages/api/node_modules ./node_modules/
COPY --chown=nonroot:nonroot --from=build-stage /app/packages/api/node_modules /packages/api/node_modules/
# nous avons besoin des sources pour lancer certains scripts manuellement
COPY --chown=nonroot:nonroot --from=build-stage /app/packages/api/src ./packages/api/src/
COPY --chown=nonroot:nonroot --from=build-stage /app/packages/api/tsconfig.json ./packages/api/
......
......@@ -3,14 +3,14 @@
"version": "1.0.0",
"description": "Camino api",
"private": true,
"main": "dist/src/index.js",
"main": "dist/api/src/index.js",
"scripts": {
"bim": "npm i && npm run build && npm run db:recreate && npm run db:import",
"build": "npm run build:api && npm run build:common",
"build:api": "rm -rf dist && tsc && mkdir -p ./dist/src/api/graphql && cp -r ./src/api/graphql/schemas ./dist/src/api/graphql",
"build:api": "rm -rf dist && tsc && mkdir -p ./dist/api/src/api/graphql && cp -r ./src/api/graphql/schemas ./dist/api/src/api/graphql",
"build:common": "cd ../common/ && tsc",
"daily": "node ./dist/src/daily_tasks.js",
"monthly": "node ./dist/src/monthly_tasks.js",
"daily": "node ./dist/api/src/daily_tasks.js",
"monthly": "node ./dist/api/src/monthly_tasks.js",
"db:dump": "pg_dump --host=localhost --username=postgres --clean --if-exists --format=c --no-owner --no-privileges --dbname=camino --file=./backups/camino.sql",
"db:export": "rm -rf sources && ts-node --transpile-only src/scripts/database-to-json-export.ts",
"db:import": "pg_restore --host=localhost --username=postgres --clean --if-exists --no-owner --no-privileges --dbname=camino ./backups/camino.sql",
......@@ -28,9 +28,9 @@
"dev:monthly": "ts-node --transpile-only ./src/scripts/monthly.ts",
"dev:schema": "node src/dev/api/graphql-dsl-to-query-convert.js",
"dev:update": "npm-check-updates -u && npm install && npm audit fix",
"documents:check": "node ./dist/src/scripts/documents-check.js",
"documents:check": "node ./dist/api/src/scripts/documents-check.js",
"lint": "prettier --write . && eslint --fix .",
"start": "node ./dist/src/index.js",
"start": "node ./dist/api/src/index.js",
"test": "npm run test:unit && npm run test:integration",
"test:unit": "jest -c jest.config.ts",
"test:integration": "JWT_SECRET=secret-tests JWT_SECRET_REFRESH=refresh-secret jest -c jest.config.integration.ts --runInBand",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment