diff --git a/Dockerfile b/Dockerfile index 2217e79f..b89d687d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -84,8 +84,6 @@ COPY --chown=node:node --from=build /usr/src/app/node_modules ./node_modules COPY --chown=node:node --from=build /usr/src/app/package*.json ./ COPY --chown=node:node --from=build /usr/src/app/dist ./dist -COPY --chown=node:node --from=build /usr/src/app/client/node_modules ./client/node_modules -COPY --chown=node:node --from=build /usr/src/app/client/package*.json ./client/ COPY --chown=node:node --from=build /usr/src/app/client/build ./client/build COPY --chown=node:node --from=build /usr/src/app/client/vcs ./client/vcs diff --git a/src/main.ts b/src/main.ts index 329e5fb6..ac4a1a59 100644 --- a/src/main.ts +++ b/src/main.ts @@ -106,6 +106,19 @@ async function bootstrap() { }); } + server.register(fastifyStatic, { + root: join(__dirname, '..', 'client', 'build', 'vendor'), + prefix: `/vendor`, + decorateReply: false, + redirect: true, + index: false, + list: { + format: 'html', + render: renderDirList, + }, + serveDotFiles: true, + }); + const app: NestFastifyApplication = await NestFactory.create( AppModule, new FastifyAdapter(server),