fix(dashboard): dockerfile + other self-hosting issues
This commit is contained in:
@@ -41,6 +41,7 @@ COPY packages/common/package.json packages/common/package.json
|
|||||||
COPY packages/auth/package.json packages/auth/package.json
|
COPY packages/auth/package.json packages/auth/package.json
|
||||||
COPY packages/email/package.json packages/email/package.json
|
COPY packages/email/package.json packages/email/package.json
|
||||||
COPY packages/constants/package.json packages/constants/package.json
|
COPY packages/constants/package.json packages/constants/package.json
|
||||||
|
COPY packages/payments/package.json packages/payments/package.json
|
||||||
COPY packages/validation/package.json packages/validation/package.json
|
COPY packages/validation/package.json packages/validation/package.json
|
||||||
COPY packages/integrations/package.json packages/integrations/package.json
|
COPY packages/integrations/package.json packages/integrations/package.json
|
||||||
COPY packages/sdks/sdk/package.json packages/sdks/sdk/package.json
|
COPY packages/sdks/sdk/package.json packages/sdks/sdk/package.json
|
||||||
|
|||||||
@@ -6,6 +6,6 @@ echo "Pulling latest docker images"
|
|||||||
docker compose pull
|
docker compose pull
|
||||||
|
|
||||||
echo "Restarting services"
|
echo "Restarting services"
|
||||||
docker compose restart
|
docker compose up -d --remove-orphans
|
||||||
|
|
||||||
echo "Done"
|
echo "Done"
|
||||||
|
|||||||
@@ -38,34 +38,36 @@ docker buildx create --name multi-arch-builder --use || true
|
|||||||
build_image() {
|
build_image() {
|
||||||
local app=$1
|
local app=$1
|
||||||
local image_name="lindesvard/openpanel-$app"
|
local image_name="lindesvard/openpanel-$app"
|
||||||
|
local full_version="$image_name:$VERSION"
|
||||||
|
|
||||||
# Prepare tags based on whether PRERELEASE is provided
|
if [ -n "$PRERELEASE" ]; then
|
||||||
if [ -z "$PRERELEASE" ]; then
|
full_version="$full_version-$PRERELEASE"
|
||||||
echo "Building multi-architecture image for $image_name:$VERSION"
|
echo "(pre-release) Building multi-architecture image for $full_version"
|
||||||
docker buildx build \
|
docker buildx build \
|
||||||
--platform linux/amd64,linux/arm64 \
|
--platform linux/amd64,linux/arm64 \
|
||||||
-t "$image_name:$VERSION" \
|
-t "$full_version" \
|
||||||
|
--build-arg DATABASE_URL="postgresql://p@p:5432/p" \
|
||||||
|
-f "apps/$app/Dockerfile" \
|
||||||
|
--push \
|
||||||
|
.
|
||||||
|
else
|
||||||
|
echo "(latest) Building multi-architecture image for $full_version"
|
||||||
|
docker buildx build \
|
||||||
|
--platform linux/amd64,linux/arm64 \
|
||||||
|
-t "$full_version" \
|
||||||
-t "$image_name:latest" \
|
-t "$image_name:latest" \
|
||||||
--build-arg DATABASE_URL="postgresql://p@p:5432/p" \
|
--build-arg DATABASE_URL="postgresql://p@p:5432/p" \
|
||||||
-f "apps/$app/Dockerfile" \
|
-f "apps/$app/Dockerfile" \
|
||||||
.
|
--push \
|
||||||
else
|
|
||||||
echo "Building multi-architecture image for $image_name:$VERSION-$PRERELEASE"
|
|
||||||
docker buildx build \
|
|
||||||
--platform linux/amd64,linux/arm64 \
|
|
||||||
-t "$image_name:$VERSION-$PRERELEASE" \
|
|
||||||
--build-arg DATABASE_URL="postgresql://p@p:5432/p" \
|
|
||||||
-f "apps/$app/Dockerfile" \
|
|
||||||
.
|
.
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "Failed to build $image_name:$VERSION"
|
echo "Failed to build $full_version"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Successfully built and pushed multi-architecture image for $image_name:$VERSION"
|
echo "Successfully built and pushed multi-architecture image for $full_version"
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "$APP" == "all" ]; then
|
if [ "$APP" == "all" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user