fix(web): vite url config error

- golang server support for arm64 arg
This commit is contained in:
Ran
2026-02-15 03:45:09 +08:00
parent 6f5ee013e6
commit 0fffed1d1e
3 changed files with 19 additions and 5 deletions
+2 -2
View File
@@ -108,8 +108,8 @@ services:
context: .
dockerfile: docker/Dockerfile.web
args:
- VITE_API_URL=${VITE_API_URL:-http://localhost:8080}
- VITE_AGENT_URL=${VITE_AGENT_URL:-http://localhost:8081}
- VITE_API_URL=${VITE_API_URL:-/api}
- VITE_AGENT_URL=${VITE_AGENT_URL:-/agent}
container_name: memoh-web
ports:
- "8082:8082"
+15 -1
View File
@@ -15,9 +15,23 @@ ARG VERSION=dev
ARG COMMIT_HASH=unknown
ARG BUILD_TIME=unknown
ARG TARGETOS
ARG TARGETARCH
RUN --mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
set -eux; \
build_os="${TARGETOS:-linux}"; \
build_arch="${TARGETARCH:-$(uname -m)}"; \
case "$build_arch" in \
x86_64) build_arch="amd64" ;; \
aarch64) build_arch="arm64" ;; \
esac; \
case "$build_arch" in \
amd64|arm64) ;; \
*) echo "unsupported TARGETARCH: $build_arch (only amd64/arm64)"; exit 1 ;; \
esac; \
CGO_ENABLED=0 GOOS="$build_os" GOARCH="$build_arch" \
go build -trimpath \
-ldflags "-s -w \
-X github.com/memohai/memoh/internal/version.Version=${VERSION} \
+2 -2
View File
@@ -12,8 +12,8 @@ COPY packages ./packages
RUN --mount=type=cache,target=/root/.local/share/pnpm/store \
pnpm install
ARG VITE_API_URL=http://localhost:8080
ARG VITE_AGENT_URL=http://localhost:8081
ARG VITE_API_URL=/api
ARG VITE_AGENT_URL=/agent
ENV VITE_API_URL=$VITE_API_URL
ENV VITE_AGENT_URL=$VITE_AGENT_URL