diff --git a/Dockerfile b/Dockerfile index 5ec7c43..2340f51 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # Stage 1: Build static content (Node.js not needed, just copy HTML) FROM alpine:3.18 AS static-builder WORKDIR /build -COPY index.html . +COPY static/index.html . RUN mkdir -p /build/static && cp index.html /build/static/ # Stage 2: Build Go backend @@ -9,11 +9,9 @@ FROM golang:1.21-alpine AS go-builder WORKDIR /app # Copy go.mod and go.sum if they exist, otherwise they'll be created -COPY go.mod go.sum* ./ -RUN go mod download || true - # Copy the Go source code -COPY main.go . +COPY backend/. . +RUN go mod download || true # Build the Go binary RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o stock-analyzer . diff --git a/go.mod b/backend/go.mod similarity index 100% rename from go.mod rename to backend/go.mod diff --git a/main.go b/backend/main.go similarity index 100% rename from main.go rename to backend/main.go diff --git a/docker-compose.yml b/docker-compose.yml index 7fc815d..e6ef92d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3.8" - services: stock-analyzer: build: diff --git a/index.html b/index.html deleted file mode 100644 index 3596005..0000000 --- a/index.html +++ /dev/null @@ -1,518 +0,0 @@ - - -
- - -