From fb863ba030afc71a36a45d8f816d3f93623d45b1 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Fri, 2 May 2025 18:50:54 +0800 Subject: [PATCH] fix: make quest image building process cleaner --- .dockerignore | 3 ++- quests/Dockerfile | 4 ++-- services/terminal-service/index.html | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.dockerignore b/.dockerignore index 2b9daea..a23c257 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,4 +1,5 @@ **/node_modules .git **/dist -**/tsconfig.tsbuildinfo \ No newline at end of file +**/tsconfig.tsbuildinfo +data \ No newline at end of file diff --git a/quests/Dockerfile b/quests/Dockerfile index 451a637..73660db 100644 --- a/quests/Dockerfile +++ b/quests/Dockerfile @@ -2,7 +2,7 @@ FROM golang:1.24-alpine as cmd-hook-builder WORKDIR /app COPY ./services/cmd-hook/go.mod ./ RUN go mod download -COPY ./services/cmd-hook ./ +COPY ./services/cmd-hook/*.go ./ RUN go build -o cmd-hook FROM golang:1.24-alpine as terminal-builder @@ -10,7 +10,7 @@ WORKDIR /app COPY ./services/terminal-service/go.mod ./ COPY ./services/terminal-service/go.sum ./ RUN go mod download -COPY ./services/terminal-service ./ +COPY ./services/terminal-service/*.go ./services/terminal-service/index.html ./ RUN go build -o terminal-service FROM debian:bookworm-slim as main diff --git a/services/terminal-service/index.html b/services/terminal-service/index.html index 8da7235..7b13162 100644 --- a/services/terminal-service/index.html +++ b/services/terminal-service/index.html @@ -44,7 +44,7 @@ // Create WebSocket connection const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:' const ws = new WebSocket( - `${protocol}//${window.location.host}${window.location.pathname}/ws?token=${token}` + `${protocol}//${window.location.host}${window.location.pathname}ws?token=${token}` ) // Handle WebSocket connection