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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user