Skip to content

Commit

Permalink
Merge pull request #3314 from incubateur-ademe/fix-trajectoire
Browse files Browse the repository at this point in the history
Fix trajectoire
  • Loading branch information
dthib authored Sep 23, 2024
2 parents 9755cd8 + ced39fb commit 973798c
Show file tree
Hide file tree
Showing 13 changed files with 11,215 additions and 195 deletions.
13 changes: 6 additions & 7 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 @@ -321,13 +322,11 @@ backend-build:

COPY --chown=node:node +backend-pre-build/app/package*.json .
COPY --chown=node:node +backend-pre-build/app/node_modules ./node_modules
COPY --chown=node:node +backend-pre-build/app/backend/package.json ./backend/package.json
COPY --chown=node:node +backend-pre-build/app/backend/node_modules ./backend/node_modules
COPY --chown=node:node +backend-pre-build/app/backend/dist ./backend/dist
COPY --chown=node:node +backend-pre-build/app/dist ./dist

EXPOSE ${PORT}

CMD ["node", "backend/dist/backend/src/main.js"]
CMD ["node", "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 973798c

Please sign in to comment.