Files
tm_back/cmd/web/Dockerfile
T
n.nakhostin 511155e0a7 Refactor Dockerfile and CI Configuration
- Updated the CI configuration in .drone.yml to use the new Dockerfile located at ./cmd/web/Dockerfile.
- Removed the old Dockerfile and Dockerfile-drone as they are no longer needed.
- Refactored the cmd/web/Dockerfile to streamline the build process and improve organization.
- Introduced a new bootstrap package to handle application initialization, including configuration, logging, MongoDB, Redis, and authorization service setup.
- Added a health check endpoint for monitoring the server status, enhancing the API's operational capabilities.
2025-08-31 14:16:37 +03:30

23 lines
551 B
Docker

ARG GO_VERSION=1.23
ARG BASH_VERSION=5.0
FROM golang:${GO_VERSION} AS go-builder
WORKDIR /go/src/company/tm_back
COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -o web-build ./cmd/web/main.go
FROM bash:${BASH_VERSION}
RUN apk --no-cache add busybox-suid curl rsync tzdata tcpdump tree ca-certificates s-nail \
&& ln -s /usr/bin/mail /usr/bin/s-nail \
&& mkdir -p /go/bin/media /go/bin/log /go/bin/config
WORKDIR /go/bin
COPY --from=go-builder /go/src/company/tm_back/web-build .
EXPOSE 8090
ENTRYPOINT /go/bin/web-build