This commit is contained in:
2026-08-04 12:50:20 +05:00
parent 4194cef934
commit 363127fe9e
3350 changed files with 1284220 additions and 1 deletions

31
backend/Dockerfile Executable file
View File

@@ -0,0 +1,31 @@
#!/bin/ash
# Specifies a parent image
FROM golang:1.26.4-alpine AS builder
# Creates an app directory to hold your app’s source code
WORKDIR /build
# Installs Go dependencies
COPY go.mod ./
COPY go.sum ./
RUN go mod download
COPY . .
# Builds your app with optional configuration
RUN GOARCH=amd64 GOOS=linux go build -o myapp ./app.go
FROM scratch
WORKDIR /app/
COPY --from=builder /build/myapp .
COPY --from=builder /build/config.yaml .
COPY --from=builder /build/web ./web
# Tells Docker which network port your container listens on
EXPOSE 5050
#ENTRYPOINT ["/app/myapp"]
CMD ["/app/myapp"]