File tree Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : job
2
+ on :
3
+ push :
4
+ branches :
5
+ - distribution
6
+ paths :
7
+ - chloria-backend/chloria-job/**
8
+ - chloria-backend/Dockerfile.dist-job
9
+ jobs :
10
+ build :
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - name : Login to Docker Hub
14
+ uses : docker/login-action@v3
15
+ with :
16
+ username : metalwhaledev
17
+ password : ${{ secrets.DOCKERHUB_TOKEN }}
18
+ - name : Build and push
19
+ uses : docker/build-push-action@v6
20
+ with :
21
+ context : " {{defaultContext}}:chloria-backend"
22
+ file : Dockerfile.dist-job
23
+ push : true
24
+ tags : metalwhaledev/chloria-job:0.1.0
Original file line number Diff line number Diff line change
1
+ # Build
2
+ FROM rust:1.84.0-bookworm AS build
3
+
4
+ COPY . /usr/src/chloria-backend/
5
+
6
+ WORKDIR /usr/src/chloria-backend/
7
+
8
+ RUN cargo install diesel_cli@2.2.7 --no-default-features --features postgres
9
+ RUN cargo build --release --package chloria-job
10
+
11
+ # Distribution
12
+ FROM debian:bookworm-20250203-slim
13
+
14
+ RUN apt update -y && \
15
+ apt install -y libpq5 ca-certificates
16
+
17
+ COPY --from=build /usr/local/cargo/bin/diesel /bin/diesel
18
+ COPY --from=build /usr/src/chloria-backend/target/release/chloria-job /bin/chloria-job
19
+ COPY ./chloria-job/migrations /usr/src/chloria-job/migrations
20
+
21
+ WORKDIR /usr/src/chloria-job/
You can’t perform that action at this time.
0 commit comments