Attempt 1

This commit is contained in:
2025-09-11 22:26:30 +02:00
parent e100836ecb
commit 3ea7308af0
182 changed files with 25449 additions and 0 deletions

35
WebApp/Dockerfile Executable file
View File

@@ -0,0 +1,35 @@
# [0] Go build environment
FROM golang:1.24.5-alpine3.21 AS builder
WORKDIR /web-server
## Dependencies
# Get
COPY ./src/main/go.mod ./src/main/go.sum ./src/
# Download
RUN cd ./src && \
go mod download
## Executable
# Get
COPY ./src/main/ ./src/
# Build
RUN cd ./src && \
go build -o ../build/web_server
# [1] Final image -> new FS
FROM alpine:latest
WORKDIR /root/
# Add certs for net communication
RUN apk add --no-cache ca-certificates
## Final build
# Get
COPY --from=builder /web-server/build ./build/
COPY ./build/stylesheet.css ./layouts/
COPY ./src/layouts ./layouts/
COPY ./config ./config/
COPY ./shared.env ./config/shared.env
# Run
CMD ["./build/web_server"]