mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-27 07:16:19 +09:00
refactor(deploy): consolidate configuration and reorganize docker files
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
FROM node:25-alpine AS builder
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
RUN npm install -g pnpm@10
|
||||
|
||||
COPY package.json pnpm-workspace.yaml pnpm-lock.yaml ./
|
||||
|
||||
COPY packages ./packages
|
||||
|
||||
RUN pnpm install
|
||||
|
||||
ARG VITE_API_URL=http://localhost:8080
|
||||
ARG VITE_AGENT_URL=http://localhost:8081
|
||||
|
||||
ENV VITE_API_URL=$VITE_API_URL
|
||||
ENV VITE_AGENT_URL=$VITE_AGENT_URL
|
||||
|
||||
WORKDIR /build/packages/web
|
||||
RUN pnpm build
|
||||
|
||||
FROM nginx:alpine
|
||||
|
||||
COPY --from=builder /build/packages/web/dist /usr/share/nginx/html
|
||||
|
||||
COPY docker/config/nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
||||
CMD wget --no-verbose --tries=1 --spider http://localhost/ || exit 1
|
||||
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
Reference in New Issue
Block a user