mirror of
https://github.com/hexastack/hexabot
synced 2025-05-13 09:01:24 +00:00
Merge pull request #93 from Emnaghz/feat/configure-ui-dev-mode
fix: add ui development target
This commit is contained in:
commit
604dd5aa0c
1
.github/workflows/docker.yml
vendored
1
.github/workflows/docker.yml
vendored
@ -58,6 +58,7 @@ jobs:
|
|||||||
file: ./frontend/Dockerfile
|
file: ./frontend/Dockerfile
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
push: true
|
push: true
|
||||||
|
target: production
|
||||||
tags: hexastack/hexabot-ui:latest
|
tags: hexastack/hexabot-ui:latest
|
||||||
|
|
||||||
- name: Build and push API Docker image
|
- name: Build and push API Docker image
|
||||||
|
@ -41,7 +41,10 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: ../
|
context: ../
|
||||||
dockerfile: ./frontend/Dockerfile
|
dockerfile: ./frontend/Dockerfile
|
||||||
|
target: development
|
||||||
pull_policy: build
|
pull_policy: build
|
||||||
|
volumes:
|
||||||
|
- ../frontend/:/app/frontend/
|
||||||
|
|
||||||
widget:
|
widget:
|
||||||
build:
|
build:
|
||||||
|
@ -41,11 +41,29 @@ RUN \
|
|||||||
else echo "Lockfile not found." && exit 1; \
|
else echo "Lockfile not found." && exit 1; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Production image, copy all the files and run next
|
FROM base AS development
|
||||||
FROM base AS runner
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
|
ENV NODE_ENV=development
|
||||||
|
ENV CHOKIDAR_USEPOLLING=true
|
||||||
|
ENV WATCHPACK_POLLING=true
|
||||||
|
|
||||||
WORKDIR /app/frontend
|
WORKDIR /app/frontend
|
||||||
|
|
||||||
ENV NODE_ENV production
|
CMD ["npm", "run", "dev", "--", "-p", "8080"]
|
||||||
|
|
||||||
|
# Production image, copy all the files and run next
|
||||||
|
FROM base AS production
|
||||||
|
WORKDIR /app/frontend
|
||||||
|
|
||||||
|
ENV NODE_ENV=production
|
||||||
# Uncomment the following line in case you want to disable telemetry during runtime.
|
# Uncomment the following line in case you want to disable telemetry during runtime.
|
||||||
ENV NEXT_TELEMETRY_DISABLED 1
|
ENV NEXT_TELEMETRY_DISABLED 1
|
||||||
|
|
||||||
|
@ -10,7 +10,14 @@ const nextConfig = withTM(["hexabot-widget"])({
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
webpack(config, _options) {
|
webpack(config) {
|
||||||
|
if (process.env.NODE_ENV==="development") {
|
||||||
|
config.watchOptions = {
|
||||||
|
poll: 1000,
|
||||||
|
aggregateTimeout: 300,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
return config;
|
return config;
|
||||||
},
|
},
|
||||||
publicRuntimeConfig: {
|
publicRuntimeConfig: {
|
||||||
|
Loading…
Reference in New Issue
Block a user