Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix the issues with the local build docker script #4647

Merged
merged 1 commit into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"build": "cross-env NODE_OPTIONS=--max-old-space-size=8192 turbo build",
"build:analyze": "turbo build:analyze",
"build:antd": "pnpm run build --filter=@vben/web-antd",
"build:docker": "./build-local-docker-image.sh",
"build:docker": "./scripts/deploy/build-local-docker-image.sh",
anncwb marked this conversation as resolved.
Show resolved Hide resolved
"build:docs": "pnpm run build --filter=@vben/docs",
"build:ele": "pnpm run build --filter=@vben/web-ele",
"build:naive": "pnpm run build --filter=@vben/web-naive",
Expand Down
4 changes: 2 additions & 2 deletions scripts/deploy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ RUN pnpm run build

RUN echo "Builder Success 🎉"

FROM nginx:stable-alpine as production
FROM nginx:stable-alpine AS production

RUN echo "types { application/javascript js mjs; }" > /etc/nginx/conf.d/mjs.conf
COPY --from=builder /app/playground/dist /usr/share/nginx/html

COPY ./nginx.conf /etc/nginx/nginx.conf
COPY --from=builder /app/scripts/deploy/nginx.conf /etc/nginx/nginx.conf

EXPOSE 8080

Expand Down
2 changes: 1 addition & 1 deletion scripts/deploy/build-local-docker-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function install_dependencies() {

function build_image() {
# build docker
docker build . -f Dockerfile -t ${IMAGE_NAME} || ERROR="build_image failed"
docker build ../../ -f Dockerfile -t ${IMAGE_NAME} || ERROR="build_image failed"
anncwb marked this conversation as resolved.
Show resolved Hide resolved
}

function log_message() {
Expand Down