Skip to content

Commit

Permalink
build(backend): temporary use local package.json for backend
Browse files Browse the repository at this point in the history
  • Loading branch information
dthib committed Sep 23, 2024
1 parent 7acbf05 commit 16cbea7
Show file tree
Hide file tree
Showing 8 changed files with 11,062 additions and 40 deletions.
9 changes: 5 additions & 4 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -301,11 +301,12 @@ front-deps-builder:

backend-pre-build:
# Build stage: todo: check if we use the same image as frontends
FROM +front-deps
FROM +node-fr

COPY --chown=node:node $BACKEND_DIR/. $BACKEND_DIR/
COPY --chown=node:node $API_DIR/. $API_DIR
RUN npm run build:backend && npm prune --omit=dev
WORKDIR /app/$BACKEND_DIR
RUN npm install
RUN npm run build && npm prune --omit=dev

SAVE ARTIFACT . /app

Expand All @@ -327,7 +328,7 @@ backend-build:

EXPOSE ${PORT}

CMD ["node", "backend/dist/backend/src/main.js"]
CMD ["node", "backend/dist/main.js"]
SAVE IMAGE --cache-from=$BACKEND_IMG_NAME --push $BACKEND_IMG_NAME

backend-deploy: ## Déploie le backend dans une app Koyeb existante
Expand Down
2 changes: 1 addition & 1 deletion backend/nest-cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://json.schemastore.org/nest-cli",
"collection": "@nestjs/schematics",
"sourceRoot": "src",
"entryFile": "backend/src/main",
"entryFile": "main",
"compilerOptions": {
"deleteOutDir": true
}
Expand Down
Loading

0 comments on commit 16cbea7

Please sign in to comment.