Compare commits

..

11 Commits

Author SHA1 Message Date
charlesgauthereau 92ad1cbfb4 chore(release): 1.0.4-rc.17 2026-01-28 22:59:35 +01:00
charlesgauthereau 82d5306dd4 chore(release): 1.0.4-rc.16 2026-01-28 22:46:27 +01:00
charlesgauthereau 52714cda21 chore(release): 1.0.4-rc.15 2026-01-28 22:25:53 +01:00
charlesgauthereau fa46d1bbc4 chore(release): 1.0.4-rc.14 2026-01-28 22:15:26 +01:00
charlesgauthereau 5535b4b22f chore(release): 1.0.4-rc.13 2026-01-28 22:02:31 +01:00
charlesgauthereau 0e86a813b5 chore(release): 1.0.4-rc.12 2026-01-28 22:00:27 +01:00
charlesgauthereau ecdb4a067d chore(release): 1.0.4-rc.11 2026-01-28 21:48:08 +01:00
charlesgauthereau 8078d733e4 chore(release): 1.0.4-rc.10 2026-01-28 21:40:05 +01:00
charlesgauthereau 06c4a05cbe chore(release): 1.0.4-rc.9 2026-01-28 21:38:58 +01:00
charlesgauthereau 6985260a8e chore(release): 1.0.4-rc.8 2026-01-28 21:24:24 +01:00
charlesgauthereau 313693f50b chore(release): 1.0.4-rc.7 2026-01-28 21:20:53 +01:00
5 changed files with 375 additions and 274 deletions
+260 -24
View File
@@ -1,3 +1,199 @@
#name: Docker Publish
#
#on:
# workflow_call:
# inputs:
# image_name:
# required: false
# type: string
# default: 'portabase/agent'
# add_latest:
# required: false
# type: boolean
# default: false
# target:
# required: false
# type: string
# default: 'prod'
# dockerfile:
# required: false
# type: string
# default: './docker/Dockerfile'
# secrets:
# DOCKER_USERNAME:
# required: true
# DOCKER_PASSWORD:
# required: true
#
#jobs:
# build-and-push:
# runs-on: ubuntu-latest
# permissions:
# packages: write
# contents: read
# steps:
# - name: Check out the repo
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
#
# - 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
#
# - name: Log in to Docker Hub
# uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
#
# - name: Set tags
# id: set-tags
# run: |
# REF_NAME=${GITHUB_REF#refs/tags/}
# TAGS="${{ inputs.image_name }}:$REF_NAME"
# if [[ "${{ inputs.add_latest }}" == "true" ]]; then
# TAGS="$TAGS,${{ inputs.image_name }}:latest"
# fi
# echo "tags=$TAGS" >> $GITHUB_OUTPUT
#
# - name: Build and push Docker image
# uses: docker/build-push-action@v6
# with:
# context: .
# file: ${{ inputs.dockerfile }}
# platforms: linux/amd64,linux/arm64
# push: true
# tags: ${{ steps.set-tags.outputs.tags }}
# target: ${{ inputs.target }}
#
#name: Docker Publish
#
#on:
# workflow_call:
# inputs:
# image_name:
# required: false
# type: string
# default: 'portabase/agent'
# add_latest:
# required: false
# type: boolean
# default: false
# target:
# required: false
# type: string
# default: 'prod'
# dockerfile:
# required: false
# type: string
# default: './docker/Dockerfile'
# secrets:
# DOCKER_USERNAME:
# required: true
# DOCKER_PASSWORD:
# required: true
#
#jobs:
# build-amd64:
# name: Build AMD64 Image
# runs-on: ubuntu-latest
# outputs:
# image: ${{ steps.set-job-output.outputs.image }}
# steps:
# - uses: actions/checkout@v4
#
# - uses: docker/setup-buildx-action@v3
#
# - uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
#
# - name: Set AMD64 image tag
# id: set-tags
# run: |
# REF_NAME=${GITHUB_REF#refs/tags/}
# AMD64_IMAGE="${{ inputs.image_name }}:$REF_NAME-amd64"
# echo "amd64_image=$AMD64_IMAGE" >> $GITHUB_OUTPUT
#
# - name: Build and push AMD64
# uses: docker/build-push-action@v6
# with:
# context: .
# file: ${{ inputs.dockerfile }}
# platforms: linux/amd64
# push: true
# tags: ${{ steps.set-tags.outputs.amd64_image }}
# target: ${{ inputs.target }}
#
# build-arm64:
# name: Build ARM64 Image
# runs-on: ubuntu-24.04-arm
# outputs:
# image: ${{ steps.set-job-output.outputs.image }}
# steps:
# - uses: actions/checkout@v4
#
# - uses: docker/setup-buildx-action@v3
#
# - uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
#
# - name: Set ARM64 image tag
# id: set-tags
# run: |
# REF_NAME=${GITHUB_REF#refs/tags/}
# ARM64_IMAGE="${{ inputs.image_name }}:$REF_NAME-arm64"
# echo "arm64_image=$ARM64_IMAGE" >> $GITHUB_OUTPUT
#
# - name: Build and push ARM64
# uses: docker/build-push-action@v6
# with:
# context: .
# file: ${{ inputs.dockerfile }}
# platforms: linux/arm64
# push: true
# tags: ${{ steps.set-tags.outputs.arm64_image }}
# target: ${{ inputs.target }}
#
#
# create-manifest:
# name: Create Multi-Arch Manifest
# runs-on: ubuntu-latest
# needs:
# - build-amd64
# - build-arm64
# steps:
# - uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
#
# - name: Create Docker manifest
# run: |
# REF_NAME=${GITHUB_REF#refs/tags/}
#
# IMAGE="${{ inputs.image_name }}:$REF_NAME"
# AMD64_IMAGE="$IMAGE-amd64"
# ARM64_IMAGE="$IMAGE-arm64"
#
# echo "AMD64_IMAGE=$AMD64_IMAGE"
# echo "ARM64_IMAGE=$ARM64_IMAGE"
#
# docker manifest create $IMAGE $AMD64_IMAGE $ARM64_IMAGE
# docker manifest push $IMAGE
#
# if [ "${{ inputs.add_latest }}" = "true" ]; then
# docker manifest create ${{ inputs.image_name }}:latest $AMD64_IMAGE $ARM64_IMAGE
# docker manifest push ${{ inputs.image_name }}:latest
# fi
name: Docker Publish
on:
@@ -26,45 +222,85 @@ on:
required: true
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
build:
name: Build and push Docker images
runs-on: ${{ matrix.platform == 'linux/amd64' && 'ubuntu-latest' || matrix.platform == 'linux/arm64' && 'ubuntu-24.04-arm' }}
strategy:
fail-fast: false
matrix:
platform: [linux/amd64, linux/arm64]
steps:
- name: Check out the repo
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- 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
- name: Log in to Docker Hub
- name: Login to Docker
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Set tags
- name: Set image tag
id: set-tags
run: |
REF_NAME=${GITHUB_REF#refs/tags/}
TAGS="${{ inputs.image_name }}:$REF_NAME"
if [[ "${{ inputs.add_latest }}" == "true" ]]; then
TAGS="$TAGS,${{ inputs.image_name }}:latest"
if [ "${{ matrix.platform }}" = "linux/amd64" ]; then
IMAGE="${{ inputs.image_name }}:$REF_NAME-amd64"
else
IMAGE="${{ inputs.image_name }}:$REF_NAME-arm64"
fi
echo "tags=$TAGS" >> $GITHUB_OUTPUT
echo "image=$IMAGE" >> $GITHUB_OUTPUT
- name: Build and push Docker image
- name: Build and push image
uses: docker/build-push-action@v6
with:
context: .
file: ${{ inputs.dockerfile }}
platforms: linux/amd64,linux/arm64
platforms: ${{ matrix.platform }}
push: true
tags: ${{ steps.set-tags.outputs.tags }}
target: ${{ inputs.target }}
tags: ${{ steps.set-tags.outputs.image }}
target: ${{ inputs.target }}
- name: Upload image tag for manifest
id: upload
run: echo "${{ steps.set-tags.outputs.image }}" > image.txt
- uses: actions/upload-artifact@v3
with:
name: image-${{ matrix.platform }}
path: image.txt
create-manifest:
name: Create multi-arch Docker manifest
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/download-artifact@v3
with:
name: image-linux/amd64
path: /tmp/digests
- uses: actions/download-artifact@v3
with:
name: image-linux/arm64
path: /tmp/digests
- name: Login to Docker
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Create and push manifest
run: |
AMD64_IMAGE=$(cat /tmp/digests/image-linux/amd64/image.txt)
ARM64_IMAGE=$(cat /tmp/digests/image-linux/arm64/image.txt)
REF_NAME=${GITHUB_REF#refs/tags/}
MANIFEST_IMAGE="${{ inputs.image_name }}:$REF_NAME"
docker manifest create $MANIFEST_IMAGE $AMD64_IMAGE $ARM64_IMAGE
docker manifest push $MANIFEST_IMAGE
if [ "${{ inputs.add_latest }}" = "true" ]; then
docker manifest create ${{ inputs.image_name }}:latest $AMD64_IMAGE $ARM64_IMAGE
docker manifest push ${{ inputs.image_name }}:latest
fi
+1 -1
View File
@@ -22,5 +22,5 @@ keywords:
- self-hosted
- portabase
license: Apache-2.0
version: 1.0.4-rc.6
version: 1.0.4-rc.17
date-released: "2026-01-28"
Generated
+1 -1
View File
@@ -1595,7 +1595,7 @@ checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c"
[[package]]
name = "portabase-agent"
version = "1.0.4-rc.5"
version = "1.0.4-rc.16"
dependencies = [
"anyhow",
"async-trait",
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "portabase-agent"
version = "1.0.4-rc.6"
version = "1.0.4-rc.17"
edition = "2024"
[dependencies]
+112 -247
View File
@@ -1,124 +1,120 @@
## =========================
## Base image (shared)
## =========================
#FROM rust:1.92.0 AS base
#
#RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
# pkg-config \
# libssl-dev \
# tzdata \
# redis-server \
# ca-certificates \
# libpq5 \
# libreadline8 \
# libncurses6 \
# zlib1g \
# curl \
# mariadb-client \
# && apt-get clean \
# && rm -rf /var/lib/apt/lists/*
#
#ARG TARGETARCH
#
## =========================
## 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/amd64/postgresql/ /tmp/pg-x64/
#COPY assets/tools/arm64/postgresql/ /tmp/pg-arm/
#
#RUN if [ "$TARGETARCH" = "amd64" ]; then \
# 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 \
# 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
## =========================
#COPY assets/tools/${TARGETARCH}/mongodb/ /usr/local/mongodb/
#RUN chmod +x /usr/local/mongodb/bin/*
#
#WORKDIR /app
#
## =========================
## 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 entrypoint.sh /entrypoint.sh
#RUN chmod +x /entrypoint.sh
#
#CMD ["/entrypoint.sh"]
#
## =========================
## Builder (production)
## =========================
#FROM base AS builder
#
#COPY . .
#RUN cargo build --release
#
#RUN echo "APP_VERSION=$(cargo pkgid | awk -F# '{print $2}')" > /app/version.env
#
## =========================
## Runtime (production)
## =========================
#FROM ubuntu:24.04 AS prod
#
#RUN apt-get update && apt-get install -y \
# redis-server \
# ca-certificates \
# tzdata \
# libpq5 \
# libreadline8 \
# libncurses6 \
# zlib1g \
# 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
#
#COPY --from=base /usr/lib/postgresql/ /usr/lib/postgresql/
#COPY --from=base /usr/local/mongodb/bin/ /usr/local/mongodb/bin/
#
#
#ENV APP_ENV=production
#
#CMD ["/entrypoint.sh"]
# =========================
# Base image (shared)
# =========================
FROM rust:1.92.0 AS base
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
pkg-config \
libssl-dev \
tzdata \
redis-server \
ca-certificates \
libpq5 \
libreadline8 \
libncurses6 \
zlib1g \
curl \
mariadb-client \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
ARG TARGETARCH
# =========================
# 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/amd64/postgresql/ /tmp/pg-x64/
COPY assets/tools/arm64/postgresql/ /tmp/pg-arm/
RUN if [ "$TARGETARCH" = "amd64" ]; then \
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 \
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
# =========================
COPY assets/tools/${TARGETARCH}/mongodb/ /usr/local/mongodb/
RUN chmod +x /usr/local/mongodb/bin/*
WORKDIR /app
# =========================
# 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 entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
CMD ["/entrypoint.sh"]
# =========================
# Builder (production)
# =========================
FROM base AS builder
COPY . .
RUN cargo build --release
RUN echo "APP_VERSION=$(cargo pkgid | awk -F# '{print $2}')" > /app/version.env
# =========================
# Runtime (production)
# =========================
FROM ubuntu:24.04 AS prod
RUN apt-get update && apt-get install -y \
redis-server \
ca-certificates \
tzdata \
libpq5 \
libreadline8 \
libncurses6 \
zlib1g \
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
COPY --from=base /usr/lib/postgresql/ /usr/lib/postgresql/
COPY --from=base /usr/local/mongodb/bin/ /usr/local/mongodb/bin/
ENV APP_ENV=production
CMD ["/entrypoint.sh"]
# =========================
# Base image (shared)
# =========================
#FROM rust:1.92.0 AS base
#ARG BUILDPLATFORM
#ARG TARGETARCH
#
#FROM --platform=$BUILDPLATFORM rust:1.92.0 AS base
#
#RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
# pkg-config \
@@ -191,19 +187,8 @@
#
#RUN rustup target add x86_64-unknown-linux-gnu aarch64-unknown-linux-gnu
#
#RUN if [ "$TARGETARCH" = "arm64" ]; then \
# apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
# gcc-aarch64-linux-gnu \
# libc6-dev-arm64-cross \
# && rm -rf /var/lib/apt/lists/*; \
# fi
#
#ENV CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc
#ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc
#
#COPY . .
#
#
#RUN if [ "$TARGETARCH" = "amd64" ]; then \
# cargo build --release --target x86_64-unknown-linux-gnu && \
# mv /app/target/x86_64-unknown-linux-gnu/release /app/target/release-app; \
@@ -247,124 +232,4 @@
#ENV APP_ENV=production
#
#CMD ["/entrypoint.sh"]
# =========================
# Base Rust image
# =========================
FROM rust:1.92.0 AS base
ARG TARGETARCH
ARG BUILDPLATFORM
# Paquets communs
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
pkg-config \
libssl-dev \
tzdata \
redis-server \
ca-certificates \
libpq5 \
libreadline8 \
libncurses6 \
zlib1g \
curl \
mariadb-client \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# =========================
# PostgreSQL client binaries
# =========================
RUN for v in 12 13 14 15 16 17 18; do mkdir -p /usr/lib/postgresql/$v/bin; done
COPY assets/tools/amd64/postgresql/ /tmp/pg-x64/
COPY assets/tools/arm64/postgresql/ /tmp/pg-arm/
RUN if [ "$TARGETARCH" = "amd64" ]; then \
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; \
else \
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
# =========================
COPY assets/tools/${TARGETARCH}/mongodb/ /usr/local/mongodb/
RUN chmod +x /usr/local/mongodb/bin/*
WORKDIR /app
# =========================
# Builder (production)
# =========================
FROM base AS builder
ARG TARGETARCH
# Ajouter cibles Rust
RUN rustup target add x86_64-unknown-linux-gnu aarch64-unknown-linux-gnu
# Installer toolchain cross-compilation ARM si nécessaire
RUN if [ "$TARGETARCH" = "arm64" ]; then \
dpkg --add-architecture arm64 && \
apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
gcc-aarch64-linux-gnu \
libc6-dev-arm64-cross \
libssl-dev:arm64 \
&& rm -rf /var/lib/apt/lists/*; \
fi
# Config OpenSSL pour cross compilation
ENV CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc
ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc
ENV OPENSSL_DIR=/usr
ENV OPENSSL_LIB_DIR=/usr/lib/aarch64-linux-gnu
ENV OPENSSL_INCLUDE_DIR=/usr/include/aarch64-linux-gnu
COPY . .
# Build selon l'architecture
RUN if [ "$TARGETARCH" = "amd64" ]; then \
cargo build --release --target x86_64-unknown-linux-gnu && \
mv /app/target/x86_64-unknown-linux-gnu/release /app/target/release-app; \
else \
cargo build --release --target aarch64-unknown-linux-gnu && \
mv /app/target/aarch64-unknown-linux-gnu/release /app/target/release-app; \
fi
RUN echo "APP_VERSION=$(cargo pkgid | awk -F# '{print $2}')" > /app/version.env
# =========================
# Runtime (production)
# =========================
FROM ubuntu:24.04 AS prod
RUN apt-get update && apt-get install -y \
redis-server \
ca-certificates \
tzdata \
libpq5 \
libreadline8 \
libncurses6 \
zlib1g \
mariadb-client \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
ARG TARGETARCH
COPY --from=builder /app/target/release-app/app /usr/local/bin/app
COPY --from=builder /app/version.env /app/version.env
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
COPY --from=base /usr/lib/postgresql/ /usr/lib/postgresql/
COPY --from=base /usr/local/mongodb/bin/ /usr/local/mongodb/bin/
ENV APP_ENV=production
CMD ["/entrypoint.sh"]