generated from metakgp/README.md
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
22 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,27 @@ | ||
FROM golang:1.21 AS builder | ||
|
||
WORKDIR /src | ||
COPY . . | ||
|
||
COPY go.mod go.sum ./ | ||
|
||
RUN go mod download | ||
RUN CGO_ENABLED=1 GOOS=linux go build -o /app --tags "fts5" -a -ldflags '-linkmode external -extldflags "-static"' . | ||
|
||
FROM busybox:1.36-musl | ||
COPY . . | ||
|
||
RUN CGO_ENABLED=1 GOOS=linux go build -o ./build --tags "fts5" -a -ldflags '-linkmode external -extldflags "-static"' . | ||
|
||
FROM alpine:latest AS app | ||
|
||
RUN apk --no-cache add bash nginx ca-certificates tzdata | ||
|
||
ENV TZ="Asia/Kolkata" | ||
|
||
WORKDIR /app | ||
|
||
# Copy metaploy configuration | ||
COPY metaploy/iqps.metaploy.conf / | ||
COPY metaploy/postinstall.sh / | ||
COPY metaploy/ ./ | ||
|
||
# Set the postinstall script as executable | ||
RUN chmod +x /postinstall.sh | ||
RUN chmod +x ./postinstall.sh | ||
|
||
# Copy the binary from the builder | ||
COPY --from=builder /app /app | ||
COPY --from=builder /src/build . | ||
|
||
# Run postinstall script and the binary | ||
CMD ["/postinstall.sh", "/app"] | ||
CMD ["./postinstall.sh", "./build"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters