Skip to content

Commit

Permalink
production dockerfile updates
Browse files Browse the repository at this point in the history
  • Loading branch information
killroy192 committed Aug 12, 2024
1 parent 7b7f1a5 commit 2644326
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ COPY . .
RUN npm ci

FROM deps as prod
ENV NODE_ENV=production
RUN make build
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 prod-nodejs
Expand All @@ -19,5 +20,6 @@ CMD ["make", "start.prod"]

FROM deps as dev
EXPOSE 9229
ENV NODE_ENV=development
RUN make build
CMD ["make", "start.debug.open"]
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,18 @@ start.debug.open:; npx nest start --debug 0.0.0.0 --watch

start.prod:; node dist/main

# docker aliases

up.dev:
@docker compose up -d && docker compose logs -f

build.prod:
@docker compose -f docker-compose.prod.yml build

up.prod:
@docker compose -f docker-compose.prod.yml up -d && docker compose -f docker-compose.prod.yml logs -f

clear.prod:
@docker compose -f docker-compose.prod.yml down

-include ${FCT_PLUGIN_PATH}/makefile-external

0 comments on commit 2644326

Please sign in to comment.