Merge branch 'docker-superlance' into 'v4.x'

Add superlance/memmon path to the project bootstrap

See merge request allianceauth/allianceauth!1560
This commit is contained in:
Ariel Rin 2023-11-08 13:39:11 +00:00
commit 6a0ddc9a83
2 changed files with 6 additions and 24 deletions

View File

@ -223,7 +223,7 @@ test-docs:
<<: *only-default <<: *only-default
image: python:3.11-bullseye image: python:3.11-bullseye
script: script:
- tox -e docs - tox -e docs
deploy_production: deploy_production:
stage: deploy stage: deploy
@ -259,16 +259,7 @@ build-image:
docker run --privileged --rm tonistiigi/binfmt --uninstall qemu-* docker run --privileged --rm tonistiigi/binfmt --uninstall qemu-*
docker run --privileged --rm tonistiigi/binfmt --install all docker run --privileged --rm tonistiigi/binfmt --install all
docker buildx create --use --name new-builder docker buildx create --use --name new-builder
docker buildx build . docker buildx build . --tag $IMAGE_TAG --tag $CURRENT_TAG --tag $MINOR_TAG --tag $MAJOR_TAG --tag $LATEST_TAG --file docker/Dockerfile --platform linux/amd64,linux/arm64 --push --build-arg AUTH_VERSION=$(echo $CI_COMMIT_TAG | cut -c 2-)
--tag $IMAGE_TAG
--tag $CURRENT_TAG
--tag $MINOR_TAG
--tag $MAJOR_TAG
--tag $LATEST_TAG
--file docker/Dockerfile
--platform linux/amd64,linux/arm64
--push
--build-arg AUTH_VERSION=$(echo $CI_COMMIT_TAG | cut -c 2-)
rules: rules:
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG
when: delayed when: delayed
@ -288,12 +279,7 @@ build-image-dev:
docker run --privileged --rm tonistiigi/binfmt --uninstall qemu-* docker run --privileged --rm tonistiigi/binfmt --uninstall qemu-*
docker run --privileged --rm tonistiigi/binfmt --install all docker run --privileged --rm tonistiigi/binfmt --install all
docker buildx create --use --name new-builder docker buildx create --use --name new-builder
docker buildx build . docker buildx build . --tag $IMAGE_TAG --file docker/Dockerfile --platform linux/amd64,linux/arm64 --push --build-arg AUTH_PACKAGE=git+https://gitlab.com/allianceauth/allianceauth@$CI_COMMIT_BRANCH
--tag $IMAGE_TAG
--file docker/Dockerfile
--platform linux/amd64,linux/arm64
--push
--build-arg AUTH_PACKAGE=git+https://gitlab.com/allianceauth/allianceauth@$CI_COMMIT_BRANCH
rules: rules:
- if: '$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == ""' - if: '$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == ""'
when: manual when: manual
@ -314,12 +300,7 @@ build-image-mr:
docker run --privileged --rm tonistiigi/binfmt --uninstall qemu-* docker run --privileged --rm tonistiigi/binfmt --uninstall qemu-*
docker run --privileged --rm tonistiigi/binfmt --install all docker run --privileged --rm tonistiigi/binfmt --install all
docker buildx create --use --name new-builder docker buildx create --use --name new-builder
docker buildx build . docker buildx build . --tag $IMAGE_TAG --file docker/Dockerfile --platform linux/amd64,linux/arm64 --push --build-arg AUTH_PACKAGE=git+$CI_MERGE_REQUEST_SOURCE_PROJECT_URL@$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
--tag $IMAGE_TAG
--file docker/Dockerfile
--platform linux/amd64,linux/arm64
--push
--build-arg AUTH_PACKAGE=git+$CI_MERGE_REQUEST_SOURCE_PROJECT_URL@$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
rules: rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"' - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: manual when: manual

View File

@ -12,13 +12,14 @@ class StartProject(BaseStartProject):
parser.add_argument('--python', help='The path to the python executable.') parser.add_argument('--python', help='The path to the python executable.')
parser.add_argument('--celery', help='The path to the celery executable.') parser.add_argument('--celery', help='The path to the celery executable.')
parser.add_argument('--gunicorn', help='The path to the gunicorn executable.') parser.add_argument('--gunicorn', help='The path to the gunicorn executable.')
parser.add_argument('--memmon', help='The path to the memmon executable.')
def create_project(parser, options, args): def create_project(parser, options, args):
# Validate args # Validate args
if len(args) < 2: if len(args) < 2:
parser.error("Please specify a name for your Alliance Auth installation.") parser.error("Please specify a name for your Alliance Auth installation.")
elif len(args) > 3: elif len(args) > 4:
parser.error("Too many arguments.") parser.error("Too many arguments.")
# First find the path to Alliance Auth # First find the path to Alliance Auth