-
Notifications
You must be signed in to change notification settings - Fork 4
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
4874b16
commit 27bb433
Showing
6 changed files
with
126 additions
and
8 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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Backend | ||
|
||
on: | ||
workflow_dispatch: {} | ||
push: | ||
branches: | ||
- "main" | ||
paths: | ||
- ".github/workflows/backend.yml" | ||
- "backend/*" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: docker/Dockerfile.backend | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: ghcr.io/txpipe/asteria-backend:${{ github.sha }} |
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 |
---|---|---|
|
@@ -10,6 +10,3 @@ target | |
|
||
# .env files | ||
**/.env | ||
|
||
# sqlx | ||
**/.sqlx |
72 changes: 72 additions & 0 deletions
72
backend/.sqlx/query-d234cba02f8f6fa0620368c1a6c164859c6a6efaade36ffa824a1bcbda537664.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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,16 @@ | ||
FROM rust:1.77-slim-buster as build | ||
|
||
WORKDIR /app | ||
|
||
RUN apt update | ||
RUN apt install -y build-essential pkg-config libssl-dev cmake libasound2-dev libudev-dev | ||
|
||
COPY ./Cargo.toml ./Cargo.toml | ||
COPY ./backend ./backend | ||
COPY ./visualizer ./visualizer | ||
|
||
RUN cargo build --release | ||
|
||
FROM rust:1.77-slim-buster | ||
COPY --from=build /app/target/release/asteria-backend . | ||
CMD ["./asteria-backend"] |