feat: import file-graph package to app

* update docker images
This commit is contained in:
wancat committed 2023-08-29 13:51:55 +08:00
1 parent 638dff4be2
commit 0bdcce5d21
5 files changed
+17 -7

No files matched your search

+8 -4
View File
@@ -1,14 +1,18 @@
# Build stage # Build stage
FROM node as build-stage FROM node as build-stage
WORKDIR /app WORKDIR /app
COPY app/package.json yarn.lock ./ COPY package.json yarn.lock ./
RUN yarn install COPY app/package.json ./app/package.json
COPY app . COPY packages/file-graph/package.json ./packages/file-graph/package.json
RUN yarn install --frozen-lockfile
COPY app ./app
COPY packages/file-graph ./packages/file-graph
RUN yarn build RUN yarn build
# Production stage # Production stage
FROM nginx:stable-alpine as production-stage FROM nginx:stable-alpine as production-stage
COPY --from=build-stage /app/dist /usr/share/nginx/html COPY --from=build-stage /app/app/dist /usr/share/nginx/html
COPY deployment/nginx.conf /etc/nginx/conf.d/default.conf COPY deployment/nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80 EXPOSE 80
CMD ["nginx", "-g", "daemon off;"] CMD ["nginx", "-g", "daemon off;"]
+5 -2
View File
@@ -1,7 +1,10 @@
FROM node FROM node
WORKDIR /app WORKDIR /app
COPY app/package.json yarn.lock ./ COPY package.json yarn.lock ./
COPY app/package.json ./app/package.json
COPY packages/file-graph/package.json ./packages/file-graph/package.json
RUN yarn install --frozen-lockfile RUN yarn install --frozen-lockfile
COPY app .
WORKDIR /app/app
CMD [ "yarn", "dev:docker", "--host", "0.0.0.0" ] CMD [ "yarn", "dev:docker", "--host", "0.0.0.0" ]
+1
View File
@@ -11,6 +11,7 @@
"preview": "vite preview" "preview": "vite preview"
}, },
"dependencies": { "dependencies": {
"@linux-odyssey/file-graph": "*",
"@fortawesome/fontawesome-svg-core": "^6.4.0", "@fortawesome/fontawesome-svg-core": "^6.4.0",
"@fortawesome/free-brands-svg-icons": "^6.4.0", "@fortawesome/free-brands-svg-icons": "^6.4.0",
"@fortawesome/free-regular-svg-icons": "^6.4.0", "@fortawesome/free-regular-svg-icons": "^6.4.0",
+2 -1
View File
@@ -9,7 +9,8 @@ services:
networks: networks:
- internal - internal
volumes: volumes:
- ./app/src:/app/src - ./app:/app/app
- ./packages/file-graph:/app/packages/file-graph
backend: backend:
build: build:
context: . context: .
+1
View File
@@ -13,6 +13,7 @@
"scripts": { "scripts": {
"app": "yarn workspace app dev", "app": "yarn workspace app dev",
"app:local": "yarn workspace app dev:local", "app:local": "yarn workspace app dev:local",
"build": "yarn workspace app build",
"server": "yarn workspace server dev", "server": "yarn workspace server dev",
"cli": "yarn workspace client start", "cli": "yarn workspace client start",
"lint": "eslint --ext .js,.vue .", "lint": "eslint --ext .js,.vue .",