mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-05 19:20:12 +08:00
setup docker prod
This commit is contained in:
1 parent
ec4e97a7d6
commit
5b0d1f92c4
8 files changed
+1117
-1919
No files matched your search
+4
-2
@@ -1,13 +1,14 @@
|
||||
FROM node:20-alpine AS build
|
||||
|
||||
RUN yarn set version berry
|
||||
WORKDIR /app
|
||||
COPY ./package.json yarn.lock ./
|
||||
COPY ./package.json yarn.lock tsconfig.json ./
|
||||
COPY packages/file-graph/package.json ./packages/file-graph/package.json
|
||||
COPY packages/utils/package.json ./packages/utils/package.json
|
||||
COPY packages/models/package.json ./packages/models/package.json
|
||||
COPY packages/constants/package.json ./packages/constants/package.json
|
||||
COPY server/package.json ./server/package.json
|
||||
RUN yarn install --frozen-lockfile --production
|
||||
RUN yarn install
|
||||
# Install docker cli
|
||||
COPY --from=docker:dind /usr/local/bin/docker /usr/local/bin/
|
||||
|
||||
@@ -26,6 +27,7 @@ COPY server ./server
|
||||
COPY quests ./quests
|
||||
|
||||
ENV NODE_ENV=production
|
||||
RUN yarn build
|
||||
WORKDIR /app/server
|
||||
CMD [ "yarn", "start" ]
|
||||
|
||||
|
||||
Reference in new issue
Block a user