Skip to content

Commit

Permalink
few tweaks and api dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
vygandas committed Dec 18, 2023
1 parent af742c0 commit 2bc62b7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/api/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"build": {
"executor": "nx:run-commands",
"options": {
"commands": ["nest build -c apps/api/nest-cli.json"]
"commands": ["nest build -c apps/api/nest-cli.json"],
"generatePackageJson": true
},
"outputs": ["{options.outputPath}"]
},
Expand Down
17 changes: 17 additions & 0 deletions docker/deployments/api.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM node:20 as production

ARG NODE_ENV=production
ENV NODE_ENV=${NODE_ENV}

WORKDIR /app

COPY package*.json ./

RUN npm install -g yarn
RUN yarn

COPY . .

EXPOSE 3000

CMD ["nx", "run", "api:production"]

0 comments on commit 2bc62b7

Please sign in to comment.