generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: move ingress to it's own service (#3477)
- Loading branch information
1 parent
80e9167
commit 3adc0de
Showing
63 changed files
with
901 additions
and
879 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 |
---|---|---|
|
@@ -245,6 +245,15 @@ jobs: | |
- uses: cashapp/[email protected] | ||
- uses: ./.github/actions/build-cache | ||
- run: just build-docker cron | ||
docker-build-http-ingress: | ||
name: Build HTTP Ingress Docker Image | ||
# if: github.event_name != 'pull_request' || github.event.action == 'enqueued' || contains( github.event.pull_request.labels.*.name, 'run-all') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: cashapp/[email protected] | ||
- uses: ./.github/actions/build-cache | ||
- run: just build-docker http-ingress | ||
docker-build-runner: | ||
name: Build Runner Docker Images | ||
# if: github.event_name != 'pull_request' || github.event.action == 'enqueued' || contains( github.event.pull_request.labels.*.name, 'run-all') | ||
|
@@ -263,7 +272,7 @@ jobs: | |
- uses: actions/checkout@v4 | ||
- uses: cashapp/[email protected] | ||
- uses: ./.github/actions/build-cache | ||
- name: Build JVM Docker Image | ||
- name: Build JVM Docker Imag | ||
run: just build-docker runner-jvm | ||
console-e2e: | ||
name: Console e2e | ||
|
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 |
---|---|---|
|
@@ -91,13 +91,32 @@ jobs: | |
name: docker-cron-artifact | ||
path: artifacts/ftl-cron | ||
retention-days: 1 | ||
build-http-ingress: | ||
name: Build HTTP Ingress Docker Image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Init Hermit | ||
uses: cashapp/[email protected] | ||
- name: Build | ||
run: | | ||
just build-docker http-ingress | ||
mkdir -p artifacts/ftl-provisioner | ||
docker save -o artifacts/ftl-http-ingress/ftl-http-ingress.tar ftl0/ftl-http-ingress:latest | ||
- name: Temporarily save Docker image | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: docker-http-ingress-artifact | ||
path: artifacts/ftl-http-ingress | ||
retention-days: 1 | ||
release-docker: | ||
name: Release Assets | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
needs: [build-runners, build-controller, build-provisioner, build-cron] | ||
needs: [build-runners, build-controller, build-provisioner, build-cron, build-http-ingress] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
@@ -130,6 +149,11 @@ jobs: | |
with: | ||
name: docker-cron-artifact | ||
path: artifacts/ftl-cron | ||
- name: Retrieve HTTP Ingress Docker image | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: docker-http-ingress-artifact | ||
path: artifacts/ftl-http-ingress | ||
- name: Load Runner Docker image | ||
run: docker load -i artifacts/ftl-runner/ftl-runner.tar | ||
- name: Load JVM Runner Docker image | ||
|
@@ -140,6 +164,8 @@ jobs: | |
run: docker load -i artifacts/ftl-provisioner/ftl-provisioner.tar | ||
- name: Load Cron Docker image | ||
run: docker load -i artifacts/ftl-cron/ftl-cron.tar | ||
- name: Load HTTP Ingress Docker image | ||
run: docker load -i artifacts/ftl-http-ingress/ftl-http-ingress.tar | ||
- name: Log in to the Container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
|
@@ -163,6 +189,9 @@ jobs: | |
docker tag ftl0/ftl-cron:latest ftl0/ftl-cron:"$GITHUB_SHA" | ||
docker tag ftl0/ftl-cron:latest ftl0/ftl-cron:"$version" | ||
docker push -a ftl0/ftl-cron | ||
docker tag ftl0/ftl-http-ingress:latest ftl0/ftl-http-ingress:"$GITHUB_SHA" | ||
docker tag ftl0/ftl-http-ingress:latest ftl0/ftl-http-ingress:"$version" | ||
docker push -a ftl0/ftl-http-ingress | ||
create-go-release: | ||
name: Release Go Binaries | ||
|
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,44 @@ | ||
FROM ubuntu:24.04 AS builder | ||
RUN apt-get update | ||
RUN apt-get install -y curl git zip | ||
|
||
# Copy Hermit bin stubs and install all packages. This is done | ||
# separately so that Docker will cache the tools correctly. | ||
COPY ./bin /src/bin | ||
ENV PATH="/src/bin:$PATH" | ||
WORKDIR /src | ||
|
||
# Seed some of the most common tools - this will be cached | ||
RUN go version | ||
RUN node --version | ||
|
||
# Download Go dependencies separately so Docker will cache them | ||
COPY go.mod go.sum ./ | ||
RUN go mod download -x | ||
|
||
# Download PNPM dependencies separately so Docker will cache them | ||
COPY frontend/console/package.json ./frontend/console/ | ||
COPY frontend/vscode/package.json ./frontend/vscode/ | ||
COPY pnpm-workspace.yaml pnpm-lock.yaml ./ | ||
RUN pnpm install --frozen-lockfile | ||
|
||
# Build | ||
COPY . /src/ | ||
RUN just errtrace | ||
# Reset timestamps so that the build state is reset | ||
RUN git ls-files -z | xargs -0 touch -r go.mod | ||
RUN just build ftl-http-ingress | ||
|
||
# Finally create the runtime image. | ||
FROM scratch | ||
|
||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ | ||
|
||
WORKDIR /plugins/ | ||
|
||
WORKDIR /service/ | ||
COPY --from=builder /src/build/release/ftl-http-ingress . | ||
|
||
EXPOSE 8893 | ||
|
||
CMD ["/service/ftl-http-ingress"] |
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
Oops, something went wrong.