Skip to content

Commit

Permalink
Merge pull request #37 from WildCodeSchool-2023-09/jujuck-patch-1
Browse files Browse the repository at this point in the history
Jujuck patch 1
  • Loading branch information
jujuck authored Feb 7, 2024
2 parents 0577c51 + 87e7bd3 commit 8bdf4a7
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 8 deletions.
33 changes: 29 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,33 @@
# Dockerfile backend
FROM node:16.14
#syntax=docker/dockerfile:1.4
FROM node:20-alpine

# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
# hadolint ignore=DL3018
RUN apk add --no-cache libc6-compat

WORKDIR /usr/src/app

COPY ./ .
RUN corepack enable && \
corepack prepare --activate pnpm@latest && \
pnpm config -g set store-dir /.pnpm-store

COPY --link ./frontend/package.json ./frontend/package.json
COPY --link ./backend/package.json ./backend/package.json

RUN cd frontend && \
pnpm fetch && \
pnpm install
RUN cd backend && \
pnpm fetch && \
pnpm install

COPY ./frontend ./frontend

RUN cd frontend && \
pnpm run build

COPY ./backend ./backend
COPY docker-entry.sh .
COPY package.json .

RUN npm install
CMD ["sh","./docker-entry.sh"]
4 changes: 0 additions & 4 deletions docker-compose.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ services:
web:
build: .
container_name: ${PROJECT_NAME:-project}-web
volumes:
- .:/var/www
- ./docker-entry.sh:/etc/entrypoint.sh
entrypoint: [ "sh", "/etc/entrypoint.sh" ]
env_file:
- ../envs/.env-${GITHUB_REPOSITORY_NAME}
environment:
Expand Down

0 comments on commit 8bdf4a7

Please sign in to comment.