mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
chore: modified dockerfiles for space and web (#1987)
This commit is contained in:
parent
b77ddf9c95
commit
cd9cebc7af
@ -14,9 +14,12 @@ RUN yarn
|
||||
# Rebuild the source code only when needed
|
||||
FROM base AS builder
|
||||
WORKDIR /space
|
||||
COPY --from=deps /space/node_modules ./node_modules
|
||||
|
||||
COPY . .
|
||||
|
||||
COPY --from=deps /space/node_modules ./node_modules
|
||||
COPY --from=deps /space/yarn.lock .
|
||||
|
||||
ENV NEXT_TELEMETRY_DISABLED 1
|
||||
|
||||
RUN yarn build
|
||||
|
@ -8,15 +8,22 @@ WORKDIR /app
|
||||
|
||||
# Install dependencies based on the preferred package manager
|
||||
COPY package.json yarn.lock .npmrc ./
|
||||
RUN yarn
|
||||
|
||||
RUN \
|
||||
if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
|
||||
elif [ -f package-lock.json ]; then npm ci; \
|
||||
else echo "Lockfile not found." && exit 1; \
|
||||
fi
|
||||
|
||||
# Rebuild the source code only when needed
|
||||
FROM base AS builder
|
||||
RUN apk add --no-cache libc6-compat
|
||||
WORKDIR /app
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
|
||||
COPY . .
|
||||
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY --from=deps /app/yarn.lock .
|
||||
|
||||
ENV NEXT_TELEMETRY_DISABLED 1
|
||||
|
||||
RUN yarn build
|
||||
@ -50,4 +57,4 @@ ENV PORT 3000
|
||||
# set hostname to localhost
|
||||
ENV HOSTNAME "0.0.0.0"
|
||||
|
||||
CMD ["node", "web/server.js"]
|
||||
CMD ["node", "app/server.js"]
|
Loading…
Reference in New Issue
Block a user