Compare commits

..

1 Commits

Author SHA1 Message Date
charlesgauthereau ddffae0d23 chore(release): 1.0.3-rc.9 2026-01-28 14:51:22 +01:00
5 changed files with 60 additions and 74 deletions
+7 -36
View File
@@ -31,23 +31,20 @@ jobs:
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up QEMU (multi-arch support)
- name: Set up QEMU (enables multi-arch emulation)
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
install: true
- name: Log in to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
@@ -62,40 +59,14 @@ jobs:
fi
echo "tags=$TAGS" >> $GITHUB_OUTPUT
- name: Build amd64 image
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ${{ inputs.dockerfile }}
# TODO : fix long build in arm64
# platforms: linux/amd64,linux/arm64
platforms: linux/amd64
push: true
tags: ${{ inputs.image_name }}:amd64
target: ${{ inputs.target }}
cache-from: type=registry,ref=${{ inputs.image_name }}:buildcache-amd64
cache-to: type=registry,ref=${{ inputs.image_name }}:buildcache-amd64,mode=max
- name: Build arm64 image
uses: docker/build-push-action@v6
with:
context: .
file: ${{ inputs.dockerfile }}
platforms: linux/arm64
push: true
tags: ${{ inputs.image_name }}:arm64
target: ${{ inputs.target }}
cache-from: type=registry,ref=${{ inputs.image_name }}:buildcache-arm64
cache-to: type=registry,ref=${{ inputs.image_name }}:buildcache-arm64,mode=max
- name: Create and push multi-arch manifest
run: |
REF_NAME=${GITHUB_REF#refs/tags/}
docker manifest create ${{ inputs.image_name }}:$REF_NAME \
--amend ${{ inputs.image_name }}:amd64 \
--amend ${{ inputs.image_name }}:arm64
docker manifest push ${{ inputs.image_name }}:$REF_NAME
if [[ "${{ inputs.add_latest }}" == "true" ]]; then
docker manifest create ${{ inputs.image_name }}:latest \
--amend ${{ inputs.image_name }}:amd64 \
--amend ${{ inputs.image_name }}:arm64
docker manifest push ${{ inputs.image_name }}:latest
fi
tags: ${{ steps.set-tags.outputs.tags }}
target: ${{ inputs.target }}
+1 -1
View File
@@ -22,5 +22,5 @@ keywords:
- self-hosted
- portabase
license: Apache-2.0
version: 1.0.3-rc.8
version: 1.0.3-rc.9
date-released: "2026-01-28"
Generated
+1 -1
View File
@@ -1595,7 +1595,7 @@ checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c"
[[package]]
name = "portabase-agent"
version = "1.0.3-rc.7"
version = "1.0.3-rc.8"
dependencies = [
"anyhow",
"async-trait",
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "portabase-agent"
version = "1.0.3-rc.8"
version = "1.0.3-rc.9"
edition = "2024"
[dependencies]
+50 -35
View File
@@ -1,9 +1,7 @@
# =========================
# Base Rust image
# Base image (shared)
# =========================
FROM rust:1.92 AS base
ARG TARGETARCH
FROM rust:1.92.0 AS base
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
pkg-config \
@@ -17,66 +15,83 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
zlib1g \
curl \
mariadb-client \
wget \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# =========================
# PostgreSQL client binaries (only target arch)
# =========================
RUN for v in 12 13 14 15 16 17 18; do mkdir -p /usr/lib/postgresql/$v/bin; done
COPY assets/tools/$TARGETARCH/postgresql/ /tmp/pg/
RUN for v in 12 13 14 15 16 17 18; do \
cp -r /tmp/pg/postgresql-$v/bin/* /usr/lib/postgresql/$v/bin/; \
done && rm -rf /tmp/pg && chmod +x /usr/lib/postgresql/*/bin/*
ARG TARGETARCH
# =========================
# MongoDB client binaries (only target arch)
# PostgreSQL client binaries (versions 12-18)
# =========================
RUN for v in 12 13 14 15 16 17 18; do \
mkdir -p /usr/lib/postgresql/$v/bin; \
done
COPY assets/tools/x64/postgresql/ /tmp/pg-x64/
COPY assets/tools/arm/postgresql/ /tmp/pg-arm/
RUN if [ "$TARGETARCH" = "amd64" ]; then \
wget -q https://fastdl.mongodb.org/tools/db/mongodb-database-tools-debian12-x86_64-100.10.0.deb -O /tmp/mongodb-tools.deb; \
for v in 12 13 14 15 16 17 18; do \
cp -r /tmp/pg-x64/postgresql-$v/bin/* /usr/lib/postgresql/$v/bin/; \
done; \
elif [ "$TARGETARCH" = "arm64" ]; then \
wget -q https://fastdl.mongodb.org/tools/db/mongodb-database-tools-ubuntu2204-arm64-100.10.0.deb -O /tmp/mongodb-tools.deb; \
fi && dpkg -i /tmp/mongodb-tools.deb || apt-get install -f -y --no-install-recommends && \
rm -f /tmp/mongodb-tools.deb && \
for v in 12 13 14 15 16 17 18; do \
cp -r /tmp/pg-arm/postgresql-$v/bin/* /usr/lib/postgresql/$v/bin/; \
done; \
fi && \
rm -rf /tmp/pg-x64 /tmp/pg-arm && \
chmod +x /usr/lib/postgresql/*/bin/*
# =========================
# MongoDB client binaries
# =========================
RUN apt-get update && \
if [ "$TARGETARCH" = "amd64" ]; then \
wget -q https://fastdl.mongodb.org/tools/db/mongodb-database-tools-debian12-x86_64-100.10.0.deb \
-O /tmp/mongodb-database-tools.deb; \
elif [ "$TARGETARCH" = "arm64" ]; then \
wget -q https://fastdl.mongodb.org/tools/db/mongodb-database-tools-ubuntu2204-arm64-100.10.0.deb \
-O /tmp/mongodb-database-tools.deb; \
fi && \
dpkg -i /tmp/mongodb-database-tools.deb || \
apt-get install -f -y --no-install-recommends && \
rm -f /tmp/mongodb-database-tools.deb && \
rm -rf /var/lib/apt/lists/* && \
mkdir -p /usr/local/mongodb/bin && \
ln -sf /usr/bin/mongodump /usr/local/mongodb/bin/mongodump || true && \
ln -sf /usr/bin/mongorestore /usr/local/mongodb/bin/mongorestore || true
if [ -f /usr/bin/mongodump ]; then \
ln -sf /usr/bin/mongodump /usr/local/mongodb/bin/mongodump; \
fi && \
if [ -f /usr/bin/mongorestore ]; then \
ln -sf /usr/bin/mongorestore /usr/local/mongodb/bin/mongorestore; \
fi
WORKDIR /app
# =========================
# Development stage
# Development image
# =========================
FROM base AS dev
RUN cargo install cargo-watch
# Pre-cache dependencies
COPY Cargo.toml Cargo.lock ./
RUN mkdir src && echo "fn main() {}" > src/main.rs
RUN cargo build
RUN rm -rf src
COPY . .
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
CMD ["/entrypoint.sh"]
# =========================
# Builder stage for production
# Builder (production)
# =========================
FROM base AS builder
WORKDIR /app
RUN cargo install cargo-chef
COPY Cargo.toml Cargo.lock ./
RUN mkdir src && echo "fn main() {}" > src/main.rs
RUN cargo chef prepare --recipe-path recipe.json
RUN cargo chef cook --recipe-path recipe.json --release
RUN rm -rf src
COPY . .
RUN cargo build --release
@@ -84,7 +99,7 @@ RUN cargo build --release
RUN echo "APP_VERSION=$(cargo pkgid | awk -F# '{print $2}')" > /app/version.env
# =========================
# Production runtime
# Runtime (production)
# =========================
FROM ubuntu:24.04 AS prod
@@ -99,11 +114,11 @@ RUN apt-get update && apt-get install -y \
mariadb-client \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY --from=builder /app/target/release/app /usr/local/bin/app
COPY --from=builder /app/version.env /app/version.env
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh