From 87b1cee957b1263b78002a5761a6c0618e160f8e Mon Sep 17 00:00:00 2001 From: Eden Kirin Date: Sun, 12 Oct 2025 00:44:13 +0200 Subject: [PATCH] Restructured --- Dockerfile | 8 +- go.mod => backend/go.mod | 0 main.go => backend/main.go | 0 docker-compose.yml | 2 - index.html | 518 ------------------------------------- 5 files changed, 3 insertions(+), 525 deletions(-) rename go.mod => backend/go.mod (100%) rename main.go => backend/main.go (100%) delete mode 100644 index.html 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 @@ - - - - - - Stock Tax Analyzer - - - - - - -
- - - -