fix: self-hosting had trial
This commit is contained in:
@@ -13,6 +13,9 @@ ENV DATABASE_URL=$DATABASE_URL
|
|||||||
ARG ENABLE_INSTRUMENTATION_HOOK
|
ARG ENABLE_INSTRUMENTATION_HOOK
|
||||||
ENV ENABLE_INSTRUMENTATION_HOOK=$ENABLE_INSTRUMENTATION_HOOK
|
ENV ENABLE_INSTRUMENTATION_HOOK=$ENABLE_INSTRUMENTATION_HOOK
|
||||||
|
|
||||||
|
ARG NEXT_PUBLIC_SELF_HOSTED
|
||||||
|
ENV NEXT_PUBLIC_SELF_HOSTED=$NEXT_PUBLIC_SELF_HOSTED
|
||||||
|
|
||||||
ENV PNPM_HOME="/pnpm"
|
ENV PNPM_HOME="/pnpm"
|
||||||
ENV PATH="$PNPM_HOME:$PATH"
|
ENV PATH="$PNPM_HOME:$PATH"
|
||||||
|
|
||||||
@@ -63,7 +66,6 @@ WORKDIR /app/apps/dashboard
|
|||||||
# Will be replaced on runtime
|
# Will be replaced on runtime
|
||||||
ENV NEXT_PUBLIC_DASHBOARD_URL="__NEXT_PUBLIC_DASHBOARD_URL__"
|
ENV NEXT_PUBLIC_DASHBOARD_URL="__NEXT_PUBLIC_DASHBOARD_URL__"
|
||||||
ENV NEXT_PUBLIC_API_URL="__NEXT_PUBLIC_API_URL__"
|
ENV NEXT_PUBLIC_API_URL="__NEXT_PUBLIC_API_URL__"
|
||||||
ENV NEXT_PUBLIC_SELF_HOSTED="__NEXT_PUBLIC_SELF_HOSTED__"
|
|
||||||
|
|
||||||
RUN pnpm run build
|
RUN pnpm run build
|
||||||
|
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ services:
|
|||||||
hard: 262144
|
hard: 262144
|
||||||
|
|
||||||
opapi:
|
opapi:
|
||||||
image: lindesvard/openpanel-api:1.2.0
|
image: lindesvard/openpanel-api:latest
|
||||||
restart: always
|
restart: always
|
||||||
command: >
|
command: >
|
||||||
sh -c "
|
sh -c "
|
||||||
@@ -158,7 +158,7 @@ services:
|
|||||||
retries: 5
|
retries: 5
|
||||||
|
|
||||||
opdashboard:
|
opdashboard:
|
||||||
image: lindesvard/openpanel-dashboard:1.2.0
|
image: lindesvard/openpanel-dashboard:latest
|
||||||
restart: always
|
restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
opapi:
|
opapi:
|
||||||
@@ -183,7 +183,7 @@ services:
|
|||||||
retries: 5
|
retries: 5
|
||||||
|
|
||||||
opworker:
|
opworker:
|
||||||
image: lindesvard/openpanel-worker:1.2.0
|
image: lindesvard/openpanel-worker:latest
|
||||||
restart: always
|
restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
opapi:
|
opapi:
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ fi
|
|||||||
if [ -z "$PRERELEASE" ]; then
|
if [ -z "$PRERELEASE" ]; then
|
||||||
read -p "You're building WITHOUT any pre-release ($VERSION). Do you wish to continue (y/N)? " -n 1 -r
|
read -p "You're building WITHOUT any pre-release ($VERSION). Do you wish to continue (y/N)? " -n 1 -r
|
||||||
else
|
else
|
||||||
read -p "You're building WITH pre-release ($VERSION-$PRERELEASE). Do you wish to continue (y/N)? " -n 1 -r
|
read -p "You're building WITH pre-release ($VERSION). Do you wish to continue (y/N)? " -n 1 -r
|
||||||
fi
|
fi
|
||||||
echo # Move to a new line
|
echo # Move to a new line
|
||||||
if [[ ! $REPLY =~ ^[Yy]$ ]]
|
if [[ ! $REPLY =~ ^[Yy]$ ]]
|
||||||
@@ -41,12 +41,12 @@ build_image() {
|
|||||||
local full_version="$image_name:$VERSION"
|
local full_version="$image_name:$VERSION"
|
||||||
|
|
||||||
if [ -n "$PRERELEASE" ]; then
|
if [ -n "$PRERELEASE" ]; then
|
||||||
full_version="$full_version-$PRERELEASE"
|
|
||||||
echo "(pre-release) Building multi-architecture image for $full_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 "$full_version" \
|
-t "$full_version" \
|
||||||
--build-arg DATABASE_URL="postgresql://p@p:5432/p" \
|
--build-arg DATABASE_URL="postgresql://p@p:5432/p" \
|
||||||
|
--build-arg NEXT_PUBLIC_SELF_HOSTED="true" \
|
||||||
-f "apps/$app/Dockerfile" \
|
-f "apps/$app/Dockerfile" \
|
||||||
--push \
|
--push \
|
||||||
.
|
.
|
||||||
@@ -57,6 +57,7 @@ build_image() {
|
|||||||
-t "$full_version" \
|
-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" \
|
||||||
|
--build-arg NEXT_PUBLIC_SELF_HOSTED="true" \
|
||||||
-f "apps/$app/Dockerfile" \
|
-f "apps/$app/Dockerfile" \
|
||||||
--push \
|
--push \
|
||||||
.
|
.
|
||||||
|
|||||||
Reference in New Issue
Block a user