diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f8d2e536d..ff83d9065 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,8 @@ jobs: build: strategy: matrix: - image: [{file: "slinky.e2e.Dockerfile", name: "slinky-simapp"}, {file: "slinky.e2e.oracle.Dockerfile", name: "slinky-sidecar"}, {file: "slinky.local.Dockerfile", name: "slinky-testapp"}] + image: [{file: "slinky.e2e.Dockerfile", name: "slinky-simapp"}, {file: "slinky.sidecar.Dockerfile", name: "slinky-sidecar"}, {file: "slinky.local.Dockerfile", name: "slinky-testapp"}, + {file: "slinky.sidecar.e2e.Dockerfile", name: "slinky-e2e-sidecar"}] runs-on: ubuntu-latest env: registry_url: 494494944992.dkr.ecr.us-east-2.amazonaws.com/skip-mev/${{ matrix.image.name }} diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 000000000..e69de29bb diff --git a/.gitignore b/.gitignore index 3ad7ea0e7..6967c32dd 100644 --- a/.gitignore +++ b/.gitignore @@ -32,4 +32,4 @@ run.go # ide .idea/* -.vscode/* \ No newline at end of file +.vscode/* diff --git a/Makefile b/Makefile index 034dad02b..0395192f0 100644 --- a/Makefile +++ b/Makefile @@ -62,7 +62,7 @@ install: docker-build: @echo "Building E2E Docker image..." @DOCKER_BUILDKIT=1 $(DOCKER) build -t skip-mev/slinky-e2e -f contrib/images/slinky.e2e.Dockerfile . - @DOCKER_BUILDKIT=1 $(DOCKER) build -t skip-mev/slinky-e2e-oracle -f contrib/images/slinky.e2e.oracle.Dockerfile . + @DOCKER_BUILDKIT=1 $(DOCKER) build -t skip-mev/slinky-e2e-oracle -f contrib/images/slinky.sidecar.Dockerfile . .PHONY: docker-build diff --git a/contrib/images/slinky.e2e.oracle.Dockerfile b/contrib/images/slinky.sidecar.Dockerfile similarity index 100% rename from contrib/images/slinky.e2e.oracle.Dockerfile rename to contrib/images/slinky.sidecar.Dockerfile diff --git a/contrib/images/slinky.sidecar.e2e.Dockerfile b/contrib/images/slinky.sidecar.e2e.Dockerfile new file mode 100644 index 000000000..0d092a329 --- /dev/null +++ b/contrib/images/slinky.sidecar.e2e.Dockerfile @@ -0,0 +1,21 @@ +FROM golang:1.22-bullseye AS builder + +WORKDIR /src/slinky +COPY go.mod . + +RUN go mod download + +COPY . . + +RUN make build +RUN go generate ./config + +FROM ubuntu:rolling +EXPOSE 8080 +EXPOSE 8001 + +COPY --from=builder /src/slinky/build/* /usr/local/bin/ +RUN apt-get update && apt-get install ca-certificates -y + +WORKDIR /usr/local/bin/ +ENTRYPOINT ["oracle", "--oracle-config-path", "/oracle/oracle.json", "--market-config-path", "/oracle/market.json", "--host", "0.0.0.0", "--port", "8080"] diff --git a/docker-compose.yml b/docker-compose.yml index 34efa7cc5..2a41304bc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,7 +8,7 @@ services: oracle: build: context: . - dockerfile: contrib/images/slinky.e2e.oracle.Dockerfile + dockerfile: contrib/images/slinky.sidecar.Dockerfile volumes: - ./config/local/oracle.json:/oracle/oracle.json - ./config/local/market.json:/oracle/market.json