Refactor Dockerfile and Update CI Configuration

- Changed the working directory in the Dockerfile to /app for better organization.
- Removed the iat.yaml configuration file to simplify the container setup and reduce complexity.
- Adjusted the exposed port to 80, aligning with standard HTTP practices for the scraper application.
- Updated the CI configuration in .drone.yml to reflect these changes, ensuring a streamlined build process.
This commit is contained in:
n.nakhostin
2025-08-31 17:13:57 +03:30
parent 31cf9a4454
commit e6bf47a769
3 changed files with 6 additions and 36 deletions
+6 -7
View File
@@ -3,21 +3,20 @@ ARG BASH_VERSION=5.0
FROM golang:${GO_VERSION} AS go-builder
WORKDIR /go/src/company/tm_back
WORKDIR /app
COPY . .
COPY cmd/scraper/iat.yaml /go/bin/config.yaml
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -o scraper-build ./cmd/scraper/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
&& ln -s /usr/bin/mail /usr/bin/s-nail
COPY --from=go-builder /go/src/company/tm_back/scraper-build .
WORKDIR /app
EXPOSE 8090
COPY --from=go-builder /app/scraper-build .
EXPOSE 80
ENTRYPOINT /go/bin/scraper-build