Skip to content

Commit 7a2a0e3

Browse files
remove redundant sqlx-cli install
1 parent 3e2f29e commit 7a2a0e3

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

.github/workflows/docker.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
context: backend
5656
builder: ${{ steps.buildx.outputs.name }}
5757
file: backend/Dockerfile
58-
push: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/main' }}
58+
push: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/CHAOS-224-KHAOS-rewrite' }}
5959
tags: |
6060
ghcr.io/devsoc-unsw/chaos-backend:${{ github.sha }}
6161
ghcr.io/devsoc-unsw/chaos-backend:staging-latest
@@ -89,7 +89,7 @@ jobs:
8989
uses: docker/build-push-action@v4
9090
with:
9191
context: frontend-nextjs
92-
push: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/main' }}
92+
push: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/CHAOS-224-KHAOS-rewrite' }}
9393
platforms: linux/amd64
9494
file: frontend-nextjs/Dockerfile
9595
tags: |

backend/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ RUN apt-get update && apt-get install -y \
66
pkg-config \
77
&& rm -rf /var/lib/apt/lists/*
88
RUN cargo install cargo-chef
9-
RUN cargo install sqlx-cli --no-default-features --features native-tls,postgres --root /usr/local
109
WORKDIR /backend
1110

1211
FROM chef AS planner
@@ -39,8 +38,7 @@ RUN apt-get update && apt-get install -y \
3938
netcat-openbsd \
4039
&& rm -rf /var/lib/apt/lists/*
4140

42-
# Copy sqlx-cli and migrations for running migrations on startup
43-
COPY --from=chef /usr/local/bin/sqlx /usr/local/bin/sqlx
41+
# Copy migrations folder for migrations on startup
4442
COPY --from=builder /backend/migrations /backend/migrations
4543
COPY --from=builder /backend/server/target/release/server /backend/server
4644

0 commit comments

Comments
 (0)