diff --git a/plane-src/apps/api/Dockerfile.api b/plane-src/apps/api/Dockerfile.api index 1325148..b7861dd 100644 --- a/plane-src/apps/api/Dockerfile.api +++ b/plane-src/apps/api/Dockerfile.api @@ -45,7 +45,6 @@ COPY plane plane/ COPY templates templates/ COPY package.json package.json -RUN apk --no-cache add "bash~=5.2" COPY ./bin ./bin/ RUN mkdir -p /code/plane/logs @@ -55,4 +54,4 @@ RUN chmod -R 777 /code # Expose container port and run entry point script EXPOSE 8000 -CMD ["./bin/docker-entrypoint-api.sh"] \ No newline at end of file +CMD ["./bin/docker-entrypoint-api.sh"] diff --git a/plane-src/apps/api/bin/docker-entrypoint-api-local.sh b/plane-src/apps/api/bin/docker-entrypoint-api-local.sh index b5489b4..5aa70c0 100755 --- a/plane-src/apps/api/bin/docker-entrypoint-api-local.sh +++ b/plane-src/apps/api/bin/docker-entrypoint-api-local.sh @@ -1,12 +1,9 @@ -#!/bin/bash +#!/bin/sh set -e python manage.py wait_for_db # Wait for migrations python manage.py wait_for_migrations -# Create the default bucket -#!/bin/bash - # Collect system information HOSTNAME=$(hostname) MAC_ADDRESS=$(ip link show | awk '/ether/ {print $2}' | head -n 1) diff --git a/plane-src/apps/api/bin/docker-entrypoint-api.sh b/plane-src/apps/api/bin/docker-entrypoint-api.sh index 7a64028..aaa5c18 100755 --- a/plane-src/apps/api/bin/docker-entrypoint-api.sh +++ b/plane-src/apps/api/bin/docker-entrypoint-api.sh @@ -1,12 +1,9 @@ -#!/bin/bash +#!/bin/sh set -e python manage.py wait_for_db # Wait for migrations python manage.py wait_for_migrations -# Create the default bucket -#!/bin/bash - # Collect system information HOSTNAME=$(hostname) MAC_ADDRESS=$(ip link show | awk '/ether/ {print $2}' | head -n 1) diff --git a/plane-src/apps/api/bin/docker-entrypoint-beat.sh b/plane-src/apps/api/bin/docker-entrypoint-beat.sh index 3a9602a..2013627 100755 --- a/plane-src/apps/api/bin/docker-entrypoint-beat.sh +++ b/plane-src/apps/api/bin/docker-entrypoint-beat.sh @@ -1,8 +1,8 @@ -#!/bin/bash +#!/bin/sh set -e python manage.py wait_for_db # Wait for migrations python manage.py wait_for_migrations # Run the processes -celery -A plane beat -l info \ No newline at end of file +celery -A plane beat -l info diff --git a/plane-src/apps/api/bin/docker-entrypoint-migrator.sh b/plane-src/apps/api/bin/docker-entrypoint-migrator.sh index 104b390..4af9916 100755 --- a/plane-src/apps/api/bin/docker-entrypoint-migrator.sh +++ b/plane-src/apps/api/bin/docker-entrypoint-migrator.sh @@ -1,6 +1,6 @@ -#!/bin/bash +#!/bin/sh set -e python manage.py wait_for_db $1 -python manage.py migrate $1 \ No newline at end of file +python manage.py migrate $1 diff --git a/plane-src/apps/api/bin/docker-entrypoint-worker.sh b/plane-src/apps/api/bin/docker-entrypoint-worker.sh index a70b5f7..c65f415 100755 --- a/plane-src/apps/api/bin/docker-entrypoint-worker.sh +++ b/plane-src/apps/api/bin/docker-entrypoint-worker.sh @@ -1,8 +1,8 @@ -#!/bin/bash +#!/bin/sh set -e python manage.py wait_for_db # Wait for migrations python manage.py wait_for_migrations # Run the processes -celery -A plane worker -l info \ No newline at end of file +celery -A plane worker -l info diff --git a/plane-src/rebuild-nas-legacy.sh b/plane-src/rebuild-nas-legacy.sh index 3518f24..7d84ac2 100755 --- a/plane-src/rebuild-nas-legacy.sh +++ b/plane-src/rebuild-nas-legacy.sh @@ -16,6 +16,7 @@ COMPOSE_OVERRIDE_FILE=${COMPOSE_OVERRIDE_FILE:-docker-compose.synology.override. BUILD_BACKEND=${BUILD_BACKEND:-1} BUILD_WEB=${BUILD_WEB:-1} BUILD_ADMIN=${BUILD_ADMIN:-0} +BUILD_NETWORK=${BUILD_NETWORK:-host} BACKEND_BUILDKIT=${BACKEND_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} RECREATE_SERVICES="" +DOCKER_BUILD_NETWORK_ARGS="" +if [ -n "$BUILD_NETWORK" ]; then + DOCKER_BUILD_NETWORK_ARGS="--network=$BUILD_NETWORK" +fi run() { if [ -n "$SUDO_CMD" ]; then @@ -84,6 +89,7 @@ if [ "$BUILD_BACKEND" = "1" ]; then printf "== backend image: %s ==\n" "$PLANE_BACKEND_IMAGE" cd "$SRC/apps/api" run_env DOCKER_BUILDKIT="$BACKEND_BUILDKIT" "$DOCKER" build \ + $DOCKER_BUILD_NETWORK_ARGS \ -t "$PLANE_BACKEND_IMAGE" \ -f Dockerfile.api . 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" cd "$SRC" 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_OIDC_LOGIN_ENABLED=$VITE_NODEDC_OIDC_LOGIN_ENABLED" \ -t "$PLANE_FRONTEND_IMAGE" \ @@ -108,6 +115,7 @@ if [ "$BUILD_ADMIN" = "1" ]; then printf "== admin image: %s ==\n" "$PLANE_ADMIN_IMAGE" cd "$SRC" if run_env DOCKER_BUILDKIT="$ADMIN_BUILDKIT" "$DOCKER" build \ + $DOCKER_BUILD_NETWORK_ARGS \ --build-arg "VITE_NODEDC_LAUNCHER_URL=$VITE_NODEDC_LAUNCHER_URL" \ -t "$PLANE_ADMIN_IMAGE" \ -f apps/admin/Dockerfile.admin .; then