mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
chore(release): 1.2.5-rc.9
This commit is contained in:
+161
-35
@@ -34,64 +34,190 @@ on:
|
|||||||
required: true
|
required: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-push:
|
|
||||||
runs-on: ubuntu-latest
|
build:
|
||||||
permissions:
|
name: Build and push Docker images (Portabase)
|
||||||
packages: write
|
runs-on: ${{ matrix.platform == 'linux/amd64' && 'ubuntu-latest' || matrix.platform == 'linux/arm64' && 'ubuntu-24.04-arm' }}
|
||||||
contents: read
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
platform: [ linux/amd64, linux/arm64 ]
|
||||||
steps:
|
steps:
|
||||||
- name: Check out the repo
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Set tags
|
- name: Login to Docker
|
||||||
id: set-tags
|
|
||||||
run: |
|
|
||||||
REF_NAME=${GITHUB_REF#refs/tags/}
|
|
||||||
TAGS="${{ inputs.image_name }}:$REF_NAME"
|
|
||||||
TAGS2="${{ inputs.image_name2 }}:$REF_NAME"
|
|
||||||
if [[ "${{ inputs.add_latest }}" == "true" ]]; then
|
|
||||||
TAGS="$TAGS,${{ inputs.image_name }}:latest"
|
|
||||||
TAGS2="$TAGS2,${{ inputs.image_name2 }}:latest"
|
|
||||||
fi
|
|
||||||
echo "tags=$TAGS" >> $GITHUB_OUTPUT
|
|
||||||
echo "tags2=$TAGS2" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- 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 account 1
|
|
||||||
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
|
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
- name: Build and push to solucetechnologies/portabase
|
- name: Set image tag
|
||||||
|
id: set-tags
|
||||||
|
run: |
|
||||||
|
REF_NAME=${GITHUB_REF#refs/tags/}
|
||||||
|
if [ "${{ matrix.platform }}" = "linux/amd64" ]; then
|
||||||
|
IMAGE="${{ inputs.image_name }}:$REF_NAME-amd64"
|
||||||
|
else
|
||||||
|
IMAGE="${{ inputs.image_name }}:$REF_NAME-arm64"
|
||||||
|
fi
|
||||||
|
echo "image=$IMAGE" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Build and push image
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ${{ inputs.dockerfile }}
|
file: ${{ inputs.dockerfile }}
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: ${{ matrix.platform }}
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.set-tags.outputs.tags }}
|
tags: ${{ steps.set-tags.outputs.image }}
|
||||||
target: ${{ inputs.target }}
|
target: ${{ inputs.target }}
|
||||||
|
|
||||||
- name: Log in to Docker Hub account 2
|
- name: Prepare artifact name
|
||||||
|
id: artifact
|
||||||
|
run: |
|
||||||
|
platform=${{ matrix.platform }}
|
||||||
|
echo "safe_platform=${platform//\//-}" >> $GITHUB_OUTPUT
|
||||||
|
echo "${{ steps.set-tags.outputs.image }}" > image.txt
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f
|
||||||
|
with:
|
||||||
|
name: image-${{ steps.artifact.outputs.safe_platform }}
|
||||||
|
path: image.txt
|
||||||
|
if-no-files-found: warn
|
||||||
|
compression-level: 6
|
||||||
|
overwrite: false
|
||||||
|
include-hidden-files: false
|
||||||
|
|
||||||
|
create-manifest:
|
||||||
|
name: Create multi-arch Docker manifest (Portabase)
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build
|
||||||
|
steps:
|
||||||
|
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131
|
||||||
|
with:
|
||||||
|
name: image-linux-amd64
|
||||||
|
path: /tmp/digests/amd64
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131
|
||||||
|
with:
|
||||||
|
name: image-linux-arm64
|
||||||
|
path: /tmp/digests/arm64
|
||||||
|
|
||||||
|
- name: Login to Docker
|
||||||
|
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Create and push manifest list
|
||||||
|
working-directory: /tmp/digests
|
||||||
|
run: |
|
||||||
|
DOCKER_IMAGES="$(cat amd64/image.txt) $(cat arm64/image.txt)"
|
||||||
|
REF_NAME=${GITHUB_REF#refs/tags/}
|
||||||
|
MANIFEST_IMAGE="${{ inputs.image_name }}:$REF_NAME"
|
||||||
|
|
||||||
|
docker buildx imagetools create $DOCKER_IMAGES -t $MANIFEST_IMAGE
|
||||||
|
docker buildx imagetools inspect $MANIFEST_IMAGE
|
||||||
|
|
||||||
|
if [ "${{ inputs.add_latest }}" = "true" ]; then
|
||||||
|
docker buildx imagetools create $DOCKER_IMAGES -t ${{ inputs.image_name }}:latest
|
||||||
|
docker buildx imagetools inspect ${{ inputs.image_name }}:latest
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
build-2:
|
||||||
|
name: Build and push Docker images (Soluce Technologies)
|
||||||
|
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: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Login to Docker
|
||||||
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
|
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USERNAME_2 }}
|
username: ${{ secrets.DOCKER_USERNAME_2 }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD_2 }}
|
password: ${{ secrets.DOCKER_PASSWORD_2 }}
|
||||||
|
|
||||||
- name: Build and push to portabase/portabase
|
- name: Set image tag
|
||||||
|
id: set-tags
|
||||||
|
run: |
|
||||||
|
REF_NAME=${GITHUB_REF#refs/tags/}
|
||||||
|
if [ "${{ matrix.platform }}" = "linux/amd64" ]; then
|
||||||
|
IMAGE2="${{ inputs.image_name2 }}:$REF_NAME-amd64"
|
||||||
|
else
|
||||||
|
IMAGE2="${{ inputs.image_name2 }}:$REF_NAME-arm64"
|
||||||
|
fi
|
||||||
|
echo "image2=$IMAGE2" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Build and push image
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ${{ inputs.dockerfile }}
|
file: ${{ inputs.dockerfile }}
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: ${{ matrix.platform }}
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.set-tags.outputs.tags2 }}
|
tags: ${{ steps.set-tags.outputs.image2 }}
|
||||||
target: ${{ inputs.target }}
|
target: ${{ inputs.target }}
|
||||||
|
|
||||||
|
- name: Prepare artifact name
|
||||||
|
id: artifact
|
||||||
|
run: |
|
||||||
|
platform=${{ matrix.platform }}
|
||||||
|
echo "safe_platform=${platform//\//-}" >> $GITHUB_OUTPUT
|
||||||
|
echo "${{ steps.set-tags.outputs.image2 }}" > image2.txt
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f
|
||||||
|
with:
|
||||||
|
name: image2-${{ steps.artifact.outputs.safe_platform }}
|
||||||
|
path: image2.txt
|
||||||
|
if-no-files-found: warn
|
||||||
|
compression-level: 6
|
||||||
|
overwrite: false
|
||||||
|
include-hidden-files: false
|
||||||
|
|
||||||
|
create-manifest-2:
|
||||||
|
name: Create multi-arch Docker manifest (Soluce Technologies)
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build-2
|
||||||
|
steps:
|
||||||
|
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131
|
||||||
|
with:
|
||||||
|
name: image-linux-amd64
|
||||||
|
path: /tmp/digests/amd64
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131
|
||||||
|
with:
|
||||||
|
name: image-linux-arm64
|
||||||
|
path: /tmp/digests/arm64
|
||||||
|
|
||||||
|
- name: Login to Docker
|
||||||
|
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_USERNAME_2 }}
|
||||||
|
password: ${{ secrets.DOCKER_PASSWORD_2 }}
|
||||||
|
|
||||||
|
- name: Create and push manifest list
|
||||||
|
working-directory: /tmp/digests
|
||||||
|
run: |
|
||||||
|
DOCKER_IMAGES="$(cat amd64/image2.txt) $(cat arm64/image2.txt)"
|
||||||
|
REF_NAME=${GITHUB_REF#refs/tags/}
|
||||||
|
MANIFEST_IMAGE="${{ inputs.image_name2 }}:$REF_NAME"
|
||||||
|
|
||||||
|
docker buildx imagetools create $DOCKER_IMAGES -t $MANIFEST_IMAGE
|
||||||
|
docker buildx imagetools inspect $MANIFEST_IMAGE
|
||||||
|
|
||||||
|
if [ "${{ inputs.add_latest }}" = "true" ]; then
|
||||||
|
docker buildx imagetools create $DOCKER_IMAGES -t ${{ inputs.image_name2 }}:latest
|
||||||
|
docker buildx imagetools inspect ${{ inputs.image_name2 }}:latest
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -26,5 +26,5 @@ keywords:
|
|||||||
- web-ui
|
- web-ui
|
||||||
- agent
|
- agent
|
||||||
license: Apache-2.0
|
license: Apache-2.0
|
||||||
version: 1.2.5-rc.8
|
version: 1.2.5-rc.9
|
||||||
date-released: "2026-02-01"
|
date-released: "2026-02-10"
|
||||||
|
|||||||
@@ -33,6 +33,15 @@ export const POST = withAgentCheck(async (request: Request, {params, agent}: {
|
|||||||
let backup: Backup | null | undefined = null;
|
let backup: Backup | null | undefined = null;
|
||||||
|
|
||||||
if (method === "automatic") {
|
if (method === "automatic") {
|
||||||
|
|
||||||
|
const ongoingBackup = await db.query.backup.findFirst({
|
||||||
|
where: and(
|
||||||
|
eq(drizzleDb.schemas.backup.status, 'ongoing'),
|
||||||
|
eq(drizzleDb.schemas.backup.databaseId, database.id),
|
||||||
|
),
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!ongoingBackup) {
|
||||||
[backup] = await db
|
[backup] = await db
|
||||||
.insert(drizzleDb.schemas.backup)
|
.insert(drizzleDb.schemas.backup)
|
||||||
.values({
|
.values({
|
||||||
@@ -46,6 +55,12 @@ export const POST = withAgentCheck(async (request: Request, {params, agent}: {
|
|||||||
{status: 500}
|
{status: 500}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
return NextResponse.json(
|
||||||
|
{error: "A backup is already ongoing"},
|
||||||
|
{status: 500}
|
||||||
|
);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
backup = await db.query.backup.findFirst({
|
backup = await db.query.backup.findFirst({
|
||||||
where: and(
|
where: and(
|
||||||
@@ -54,7 +69,6 @@ export const POST = withAgentCheck(async (request: Request, {params, agent}: {
|
|||||||
),
|
),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
if (!backup) {
|
if (!backup) {
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{error: "Unable to find the corresponding backup"},
|
{error: "Unable to find the corresponding backup"},
|
||||||
|
|||||||
@@ -68,14 +68,16 @@ export const PATCH = withAgentCheck(async (request: Request, {params, agent}: {
|
|||||||
if (hasSuccessfulStorage && backup.status !== "success") {
|
if (hasSuccessfulStorage && backup.status !== "success") {
|
||||||
await db
|
await db
|
||||||
.update(drizzleDb.schemas.backup)
|
.update(drizzleDb.schemas.backup)
|
||||||
.set({status: "success"})
|
.set({
|
||||||
|
status: "success",
|
||||||
|
fileSize: fileSize,
|
||||||
|
})
|
||||||
.where(eq(drizzleDb.schemas.backup.id, backup.id));
|
.where(eq(drizzleDb.schemas.backup.id, backup.id));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
eventEmitter.emit('modification', {update: true});
|
eventEmitter.emit('modification', {update: true});
|
||||||
|
|
||||||
|
|
||||||
return NextResponse.json({
|
return NextResponse.json({
|
||||||
message: "Backup status successfully updated",
|
message: "Backup status successfully updated",
|
||||||
backupStorage: backupStorage
|
backupStorage: backupStorage
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ services:
|
|||||||
-upload-dir /data/uploads/tmp
|
-upload-dir /data/uploads/tmp
|
||||||
-hooks-http http://localhost:8887/api/tus/hooks
|
-hooks-http http://localhost:8887/api/tus/hooks
|
||||||
-max-size 21474836480
|
-max-size 21474836480
|
||||||
|
-base-path /tus/files/
|
||||||
extra_hosts:
|
extra_hosts:
|
||||||
- "localhost:host-gateway"
|
- "localhost:host-gateway"
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import type {NextConfig} from "next";
|
import type {NextConfig} from "next";
|
||||||
import {PORTABASE_DEFAULT_SETTINGS} from "./portabase.config";
|
import {PORTABASE_DEFAULT_SETTINGS} from "./portabase.config";
|
||||||
|
|
||||||
|
const isDev = process.env.NODE_ENV === "development";
|
||||||
|
|
||||||
|
|
||||||
function buildCSPHeader(): string {
|
function buildCSPHeader(): string {
|
||||||
const {CSP} = PORTABASE_DEFAULT_SETTINGS.SECURITY;
|
const {CSP} = PORTABASE_DEFAULT_SETTINGS.SECURITY;
|
||||||
@@ -47,6 +49,17 @@ const nextConfig: NextConfig = {
|
|||||||
},
|
},
|
||||||
proxyClientMaxBodySize: '10gb',
|
proxyClientMaxBodySize: '10gb',
|
||||||
},
|
},
|
||||||
|
async rewrites() {
|
||||||
|
if (!isDev) return [];
|
||||||
|
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
source: "/tus/:path*",
|
||||||
|
destination: "http://localhost:1080/tus/:path*",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
},
|
||||||
|
|
||||||
async headers() {
|
async headers() {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "portabase",
|
"name": "portabase",
|
||||||
"version": "1.2.5-rc.8",
|
"version": "1.2.5-rc.9",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev --turbopack -p 8887",
|
"dev": "next dev --turbopack -p 8887",
|
||||||
|
|||||||
Reference in New Issue
Block a user