fix: draft-add ui development target

This commit is contained in:
Emnaghz 2024-09-27 09:44:08 +01:00
parent d47deeb899
commit 27dc278e2c
3 changed files with 41 additions and 3 deletions

View File

@ -41,7 +41,17 @@ services:
build:
context: ../
dockerfile: ./frontend/Dockerfile
target: development
pull_policy: build
environment:
- NODE_ENV=development
- CHOKIDAR_USEPOLLING=true
- WATCHPACK_POLLING=true
volumes:
- ../frontend/src:/app/src
- ../frontend/src/components:/app/src/components
ports:
- 8081:8081
widget:
build:

View File

@ -73,3 +73,25 @@ ENV PORT 8080
# server.js is created by next build from the standalone output
# https://nextjs.org/docs/pages/api-reference/next-config-js/output
CMD HOSTNAME="0.0.0.0" node server.js
FROM base AS development
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY --from=deps /app/package.json ./package.json
COPY --from=deps /app/package-lock.json ./package-lock.json
COPY ./widget ./widget
COPY ./frontend ./frontend
COPY --from=deps /app/widget/node_modules ./widget/node_modules
COPY --from=deps /app/frontend/node_modules ./frontend/node_modules
ENV NODE_ENV=development
ENV CHOKIDAR_USEPOLLING=true
ENV WATCHPACK_POLLING=true
EXPOSE 8081
WORKDIR /app/frontend
CMD ["npm", "run", "dev"]

View File

@ -10,9 +10,15 @@ const nextConfig = withTM(["hexabot-widget"])({
},
];
},
webpack(config, _options) {
return config;
},
webpack: (config => {
config.watchOptions = {
poll: 1000,
aggregateTimeout: 300,
// ignored: ['**/node_modules']
}
return config
}),
publicRuntimeConfig: {
lang: {
default: "en",