FIX - NAS DEPLOY: stabilize Tasker legacy rebuild

This commit is contained in:
DCCONSTRUCTIONS 2026-05-16 04:41:11 +03:00
parent 3b96a2613b
commit ae1e425974
7 changed files with 17 additions and 16 deletions

View File

@ -45,7 +45,6 @@ COPY plane plane/
COPY templates templates/ COPY templates templates/
COPY package.json package.json COPY package.json package.json
RUN apk --no-cache add "bash~=5.2"
COPY ./bin ./bin/ COPY ./bin ./bin/
RUN mkdir -p /code/plane/logs RUN mkdir -p /code/plane/logs
@ -55,4 +54,4 @@ RUN chmod -R 777 /code
# Expose container port and run entry point script # Expose container port and run entry point script
EXPOSE 8000 EXPOSE 8000
CMD ["./bin/docker-entrypoint-api.sh"] CMD ["./bin/docker-entrypoint-api.sh"]

View File

@ -1,12 +1,9 @@
#!/bin/bash #!/bin/sh
set -e set -e
python manage.py wait_for_db python manage.py wait_for_db
# Wait for migrations # Wait for migrations
python manage.py wait_for_migrations python manage.py wait_for_migrations
# Create the default bucket
#!/bin/bash
# Collect system information # Collect system information
HOSTNAME=$(hostname) HOSTNAME=$(hostname)
MAC_ADDRESS=$(ip link show | awk '/ether/ {print $2}' | head -n 1) MAC_ADDRESS=$(ip link show | awk '/ether/ {print $2}' | head -n 1)

View File

@ -1,12 +1,9 @@
#!/bin/bash #!/bin/sh
set -e set -e
python manage.py wait_for_db python manage.py wait_for_db
# Wait for migrations # Wait for migrations
python manage.py wait_for_migrations python manage.py wait_for_migrations
# Create the default bucket
#!/bin/bash
# Collect system information # Collect system information
HOSTNAME=$(hostname) HOSTNAME=$(hostname)
MAC_ADDRESS=$(ip link show | awk '/ether/ {print $2}' | head -n 1) MAC_ADDRESS=$(ip link show | awk '/ether/ {print $2}' | head -n 1)

View File

@ -1,8 +1,8 @@
#!/bin/bash #!/bin/sh
set -e set -e
python manage.py wait_for_db python manage.py wait_for_db
# Wait for migrations # Wait for migrations
python manage.py wait_for_migrations python manage.py wait_for_migrations
# Run the processes # Run the processes
celery -A plane beat -l info celery -A plane beat -l info

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/sh
set -e set -e
python manage.py wait_for_db $1 python manage.py wait_for_db $1
python manage.py migrate $1 python manage.py migrate $1

View File

@ -1,8 +1,8 @@
#!/bin/bash #!/bin/sh
set -e set -e
python manage.py wait_for_db python manage.py wait_for_db
# Wait for migrations # Wait for migrations
python manage.py wait_for_migrations python manage.py wait_for_migrations
# Run the processes # Run the processes
celery -A plane worker -l info celery -A plane worker -l info

View File

@ -16,6 +16,7 @@ COMPOSE_OVERRIDE_FILE=${COMPOSE_OVERRIDE_FILE:-docker-compose.synology.override.
BUILD_BACKEND=${BUILD_BACKEND:-1} BUILD_BACKEND=${BUILD_BACKEND:-1}
BUILD_WEB=${BUILD_WEB:-1} BUILD_WEB=${BUILD_WEB:-1}
BUILD_ADMIN=${BUILD_ADMIN:-0} BUILD_ADMIN=${BUILD_ADMIN:-0}
BUILD_NETWORK=${BUILD_NETWORK:-host}
BACKEND_BUILDKIT=${BACKEND_BUILDKIT:-0} BACKEND_BUILDKIT=${BACKEND_BUILDKIT:-0}
WEB_BUILDKIT=${WEB_BUILDKIT:-0} WEB_BUILDKIT=${WEB_BUILDKIT:-0}
@ -34,6 +35,10 @@ SMOKE_BASE_URL=${SMOKE_BASE_URL:-https://ops.nodedc.ru}
SMOKE_RESOLVE=${SMOKE_RESOLVE:-ops.nodedc.ru:443:127.0.0.1} SMOKE_RESOLVE=${SMOKE_RESOLVE:-ops.nodedc.ru:443:127.0.0.1}
RECREATE_SERVICES="" RECREATE_SERVICES=""
DOCKER_BUILD_NETWORK_ARGS=""
if [ -n "$BUILD_NETWORK" ]; then
DOCKER_BUILD_NETWORK_ARGS="--network=$BUILD_NETWORK"
fi
run() { run() {
if [ -n "$SUDO_CMD" ]; then if [ -n "$SUDO_CMD" ]; then
@ -84,6 +89,7 @@ if [ "$BUILD_BACKEND" = "1" ]; then
printf "== backend image: %s ==\n" "$PLANE_BACKEND_IMAGE" printf "== backend image: %s ==\n" "$PLANE_BACKEND_IMAGE"
cd "$SRC/apps/api" cd "$SRC/apps/api"
run_env DOCKER_BUILDKIT="$BACKEND_BUILDKIT" "$DOCKER" build \ run_env DOCKER_BUILDKIT="$BACKEND_BUILDKIT" "$DOCKER" build \
$DOCKER_BUILD_NETWORK_ARGS \
-t "$PLANE_BACKEND_IMAGE" \ -t "$PLANE_BACKEND_IMAGE" \
-f Dockerfile.api . -f Dockerfile.api .
RECREATE_SERVICES="$RECREATE_SERVICES api worker beat-worker" RECREATE_SERVICES="$RECREATE_SERVICES api worker beat-worker"
@ -95,6 +101,7 @@ if [ "$BUILD_WEB" = "1" ]; then
printf "== frontend image: %s ==\n" "$PLANE_FRONTEND_IMAGE" printf "== frontend image: %s ==\n" "$PLANE_FRONTEND_IMAGE"
cd "$SRC" cd "$SRC"
run_env DOCKER_BUILDKIT="$WEB_BUILDKIT" "$DOCKER" build \ run_env DOCKER_BUILDKIT="$WEB_BUILDKIT" "$DOCKER" build \
$DOCKER_BUILD_NETWORK_ARGS \
--build-arg "VITE_NODEDC_LAUNCHER_URL=$VITE_NODEDC_LAUNCHER_URL" \ --build-arg "VITE_NODEDC_LAUNCHER_URL=$VITE_NODEDC_LAUNCHER_URL" \
--build-arg "VITE_NODEDC_OIDC_LOGIN_ENABLED=$VITE_NODEDC_OIDC_LOGIN_ENABLED" \ --build-arg "VITE_NODEDC_OIDC_LOGIN_ENABLED=$VITE_NODEDC_OIDC_LOGIN_ENABLED" \
-t "$PLANE_FRONTEND_IMAGE" \ -t "$PLANE_FRONTEND_IMAGE" \
@ -108,6 +115,7 @@ if [ "$BUILD_ADMIN" = "1" ]; then
printf "== admin image: %s ==\n" "$PLANE_ADMIN_IMAGE" printf "== admin image: %s ==\n" "$PLANE_ADMIN_IMAGE"
cd "$SRC" cd "$SRC"
if run_env DOCKER_BUILDKIT="$ADMIN_BUILDKIT" "$DOCKER" build \ if run_env DOCKER_BUILDKIT="$ADMIN_BUILDKIT" "$DOCKER" build \
$DOCKER_BUILD_NETWORK_ARGS \
--build-arg "VITE_NODEDC_LAUNCHER_URL=$VITE_NODEDC_LAUNCHER_URL" \ --build-arg "VITE_NODEDC_LAUNCHER_URL=$VITE_NODEDC_LAUNCHER_URL" \
-t "$PLANE_ADMIN_IMAGE" \ -t "$PLANE_ADMIN_IMAGE" \
-f apps/admin/Dockerfile.admin .; then -f apps/admin/Dockerfile.admin .; then