-
Notifications
You must be signed in to change notification settings - Fork 97
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
1 parent
18b4094
commit 56cc165
Showing
7 changed files
with
117 additions
and
178 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
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 |
---|---|---|
@@ -0,0 +1,57 @@ | ||
group "default" { | ||
targets = [ | ||
"peerdb", | ||
"flow-worker", | ||
"flow-api", | ||
"flow-snapshot-worker", | ||
"peerdb-ui" | ||
] | ||
} | ||
|
||
target "flow-api" { | ||
context = "." | ||
dockerfile = "stacks/flow.Dockerfile" | ||
target = "flow-api" | ||
platforms = [ | ||
"linux/amd64", | ||
"linux/arm64", | ||
] | ||
} | ||
|
||
target "flow-snapshot-worker" { | ||
context = "." | ||
dockerfile = "stacks/flow.Dockerfile" | ||
target = "flow-snapshot-worker" | ||
platforms = [ | ||
"linux/amd64", | ||
"linux/arm64", | ||
] | ||
} | ||
|
||
target "flow-worker" { | ||
context = "." | ||
dockerfile = "stacks/flow.Dockerfile" | ||
target = "flow-worker" | ||
platforms = [ | ||
"linux/amd64", | ||
"linux/arm64", | ||
] | ||
} | ||
|
||
target "peerdb" { | ||
context = "." | ||
dockerfile = "stacks/peerdb-server.Dockerfile" | ||
platforms = [ | ||
"linux/amd64", | ||
"linux/arm64", | ||
] | ||
} | ||
|
||
target "peerdb-ui" { | ||
context = "." | ||
dockerfile = "stacks/peerdb-ui.Dockerfile" | ||
platforms = [ | ||
"linux/amd64", | ||
"linux/arm64", | ||
] | ||
} |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# syntax=docker/dockerfile:1.2 | ||
|
||
FROM golang:1.21.3-bookworm AS builder | ||
RUN apt-get update && apt-get install -y gcc libgeos-dev | ||
WORKDIR /root/flow | ||
|
||
# first copy only go.mod and go.sum to cache dependencies | ||
COPY flow/go.mod . | ||
COPY flow/go.sum . | ||
|
||
# download all the dependencies | ||
RUN go mod download | ||
|
||
# Copy all the code | ||
COPY flow . | ||
|
||
# build the binary from cmd folder | ||
WORKDIR /root/flow/cmd | ||
ENV CGO_ENABLED=1 | ||
RUN go build -ldflags="-s -w" -o /root/peer-flow . | ||
|
||
FROM debian:bookworm-slim AS flow-base | ||
RUN apt-get update && apt-get install -y ca-certificates gcc libgeos-dev | ||
WORKDIR /root | ||
COPY --from=builder /root/peer-flow . | ||
|
||
FROM flow-base AS flow-api | ||
EXPOSE 8112 | ||
EXPOSE 8113 | ||
ENTRYPOINT [\ | ||
"./peer-flow",\ | ||
"api",\ | ||
"--port",\ | ||
"8112",\ | ||
"--gateway-port",\ | ||
"8113"\ | ||
] | ||
|
||
FROM flow-base AS flow-worker | ||
ENTRYPOINT [\ | ||
"./peer-flow",\ | ||
"worker"\ | ||
] | ||
|
||
FROM flow-base AS flow-snapshot-worker | ||
ENTRYPOINT [\ | ||
"./peer-flow",\ | ||
"snapshot-worker"\ | ||
] |