mirror of
https://github.com/dec0dOS/zero-ui.git
synced 2025-07-06 21:11:41 -07:00
chore: update dockerfile
This commit is contained in:
parent
69d4d2288f
commit
e88c95454e
2 changed files with 17 additions and 14 deletions
|
@ -3,7 +3,9 @@
|
||||||
*Dockerfile*
|
*Dockerfile*
|
||||||
*docker-compose*
|
*docker-compose*
|
||||||
node_modules
|
node_modules
|
||||||
jsconfig.js
|
jsconfig.json
|
||||||
|
tsconfig.json
|
||||||
|
.eslintrc.json
|
||||||
.DS_Store
|
.DS_Store
|
||||||
tmp
|
tmp
|
||||||
temp
|
temp
|
||||||
|
@ -13,4 +15,5 @@ npm-debug.log*
|
||||||
yarn-debug.log*
|
yarn-debug.log*
|
||||||
yarn-error.log*
|
yarn-error.log*
|
||||||
|
|
||||||
|
.yarn/cache
|
||||||
backend/data/db.json
|
backend/data/db.json
|
||||||
|
|
|
@ -1,30 +1,30 @@
|
||||||
FROM --platform=$BUILDPLATFORM node:lts-alpine as frontend-build
|
FROM --platform=$BUILDPLATFORM node:lts-alpine as frontend-build
|
||||||
|
|
||||||
ENV INLINE_RUNTIME_CHUNK=false
|
|
||||||
ENV GENERATE_SOURCEMAP=false
|
ENV GENERATE_SOURCEMAP=false
|
||||||
|
|
||||||
WORKDIR /app/frontend
|
WORKDIR /app/frontend
|
||||||
COPY yarn.lock .yarnrc.yml ./
|
WORKDIR /app/
|
||||||
COPY .yarn/ ./.yarn/
|
COPY --link package.json yarn.lock* .yarnrc.yml ./
|
||||||
COPY ./frontend/package*.json /app/frontend
|
COPY --link .yarn/ ./.yarn
|
||||||
RUN yarn install
|
COPY --link ./frontend/package.json /app/frontend
|
||||||
|
RUN yarn workspaces focus frontend
|
||||||
COPY ./frontend /app/frontend
|
COPY --link ./frontend /app/frontend
|
||||||
|
WORKDIR /app/frontend
|
||||||
RUN yarn build
|
RUN yarn build
|
||||||
|
|
||||||
|
|
||||||
FROM node:lts-alpine
|
FROM node:lts-alpine
|
||||||
|
|
||||||
WORKDIR /app/frontend/build
|
WORKDIR /app/frontend/build
|
||||||
COPY --from=frontend-build /app/frontend/build /app/frontend/build/
|
COPY --link --from=frontend-build /app/frontend/build /app/frontend/build/
|
||||||
|
|
||||||
WORKDIR /app/backend
|
WORKDIR /app/backend
|
||||||
COPY yarn.lock .yarnrc.yml ./
|
COPY --link package.json yarn.lock* .yarnrc.yml ./
|
||||||
COPY .yarn/ ./.yarn/
|
COPY --link .yarn/ ./.yarn
|
||||||
COPY ./backend/package*.json /app/backend
|
COPY --link ./backend/package.json /app/backend
|
||||||
RUN yarn install
|
RUN yarn workspaces focus --production backend && yarn cache clean
|
||||||
|
|
||||||
COPY ./backend /app/backend
|
COPY --link ./backend /app/backend
|
||||||
|
|
||||||
EXPOSE 4000
|
EXPOSE 4000
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue