diff --git a/.github/workflows/_elixir.yml b/.github/workflows/_elixir.yml index 8eb4d4693..0c1267a10 100644 --- a/.github/workflows/_elixir.yml +++ b/.github/workflows/_elixir.yml @@ -16,7 +16,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} services: postgres: - image: us-east1-docker.pkg.dev/firezone-staging/firezone/postgres:15 + image: postgres:15 ports: - 5432:5432 env: @@ -131,7 +131,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} services: postgres: - image: us-east1-docker.pkg.dev/firezone-staging/firezone/postgres:15 + image: postgres:15 ports: - 5432:5432 env: @@ -185,7 +185,7 @@ jobs: MIX_TEST_PARTITION: [1] services: postgres: - image: us-east1-docker.pkg.dev/firezone-staging/firezone/postgres:15 + image: postgres:15 ports: - 5432:5432 env: diff --git a/.github/workflows/build-postgres.yml b/.github/workflows/build-postgres.yml deleted file mode 100644 index 2da963756..000000000 --- a/.github/workflows/build-postgres.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Build Postgres - -on: - workflow_dispatch: - schedule: - - cron: "0 0 * * *" - -permissions: - id-token: write - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - name: Set up QEMU - uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0 - - uses: ./.github/actions/gcp-docker-login - id: login - with: - project: firezone-staging - - name: Build and push - uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0 - with: - context: elixir - file: elixir/Dockerfile.postgres-dev - platforms: | - linux/amd64 - linux/arm64 - push: true - tags: | - ${{ steps.login.outputs.registry }}/firezone/postgres:latest - ${{ steps.login.outputs.registry }}/firezone/postgres:${{ github.sha }} - ${{ steps.login.outputs.registry }}/firezone/postgres:15 diff --git a/docker-compose.yml b/docker-compose.yml index 9ecfa438d..89eb5b1b3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,8 +2,7 @@ services: # Dependencies postgres: # TODO: Enable pgaudit on dev instance. See https://github.com/pgaudit/pgaudit/issues/44#issuecomment-455090262 - # Includes wal2json - image: us-east1-docker.pkg.dev/firezone-staging/firezone/postgres:15 + image: postgres:15 command: ["postgres", "-c", "wal_level=logical"] volumes: - postgres-data:/var/lib/postgresql/data diff --git a/elixir/Dockerfile.postgres-dev b/elixir/Dockerfile.postgres-dev deleted file mode 100644 index 7c5c97ff3..000000000 --- a/elixir/Dockerfile.postgres-dev +++ /dev/null @@ -1,19 +0,0 @@ -# Builds a Postgres image with needed extensions and modules for local development - -# Install wal2json -ARG POSTGRES_VERSION=15 -FROM postgres:${POSTGRES_VERSION}-alpine AS builder -RUN apk add --no-cache \ - build-base \ - git \ - llvm \ - clang \ - curl -ARG WAL2JSON_VERSION=2_6 -RUN curl -fssL https://github.com/eulerto/wal2json/archive/refs/tags/wal2json_${WAL2JSON_VERSION}.tar.gz | tar -xzf - -C /tmp --strip-components=1 -WORKDIR /tmp -RUN USE_PGXS=1 make && make install - -# Prepare final image -FROM postgres:${POSTGRES_VERSION}-alpine -COPY --from=builder /tmp/wal2json.so /usr/local/lib/postgresql/