Restructured

This commit is contained in:
Eden Kirin
2025-10-12 00:44:13 +02:00
parent e9360cbc08
commit 87b1cee957
5 changed files with 3 additions and 525 deletions

View File

@ -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 .