update: repo & deps
This commit is contained in:
parent
7f8b19353a
commit
90856717e4
4 changed files with 164 additions and 631 deletions
5
.dockerignore
Normal file
5
.dockerignore
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
/target
|
||||||
|
.tbcfg
|
||||||
|
*.txt
|
||||||
|
*.log
|
||||||
|
|
||||||
747
Cargo.lock
generated
747
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -8,7 +8,7 @@ axum = "0.8.7"
|
||||||
env_logger = "0.11.8"
|
env_logger = "0.11.8"
|
||||||
git2 = { version = "0.20.3", features = ["https", "ssh"] }
|
git2 = { version = "0.20.3", features = ["https", "ssh"] }
|
||||||
libgit2-sys = { version = "0.18.3", features = ["ssh"] }
|
libgit2-sys = { version = "0.18.3", features = ["ssh"] }
|
||||||
libtbr = { git = "https://gitlab.forthrd.io/Pakin/libtbr.git", version = "0.1.1" }
|
libtbr = { git = "https://pakin-inspiron-15-3530.tail110d9.ts.net/pakin/libtbr.git", version = "0.1.1" }
|
||||||
log = "0.4.29"
|
log = "0.4.29"
|
||||||
prost = "0.14.1"
|
prost = "0.14.1"
|
||||||
reqwest = { version = "0.12.25", features = ["json"] }
|
reqwest = { version = "0.12.25", features = ["json"] }
|
||||||
|
|
|
||||||
41
Dockerfile
Normal file
41
Dockerfile
Normal file
|
|
@ -0,0 +1,41 @@
|
||||||
|
FROM rustlang/rust:nightly-slim AS builder
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Install build dependencies
|
||||||
|
RUN apt update && apt install -y \
|
||||||
|
musl-tools \
|
||||||
|
musl-dev \
|
||||||
|
build-essential \
|
||||||
|
libssl-dev \
|
||||||
|
curl \
|
||||||
|
pkg-config \
|
||||||
|
ca-certificates \
|
||||||
|
protobuf-compiler
|
||||||
|
|
||||||
|
# Copy dependency files first for better caching
|
||||||
|
COPY Cargo.toml Cargo.lock ./
|
||||||
|
COPY ./src ./src
|
||||||
|
COPY build.rs ./
|
||||||
|
COPY tbm-proto ./tbm-proto
|
||||||
|
|
||||||
|
# Download config
|
||||||
|
RUN curl -X GET https://pakin-inspiron-15-3530.tail110d9.ts.net/pakin/tbm-git-repo-service/releases/download/config/.tbcfg -o .tbcfg
|
||||||
|
|
||||||
|
# Build the application
|
||||||
|
RUN cargo build --release
|
||||||
|
|
||||||
|
# Builder
|
||||||
|
FROM gcr.io/distroless/cc
|
||||||
|
|
||||||
|
# Copy the binary
|
||||||
|
COPY --from=builder /app/target/release/tbm-git-repo-service /
|
||||||
|
COPY --from=builder /app/.tbcfg /
|
||||||
|
|
||||||
|
# Create data directory
|
||||||
|
|
||||||
|
EXPOSE 36583
|
||||||
|
|
||||||
|
# Environment defaults
|
||||||
|
|
||||||
|
CMD ["./tbm-git-repo-service"]
|
||||||
Loading…
Add table
Add a link
Reference in a new issue