From: David Taylor Date: Fri, 30 Dec 2022 12:45:32 +0000 (+0000) Subject: DEV: Allow booting app with slim image and make default for aarch46 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=76383a95e688be077cdbee58456f462b461bee89;p=discourse_docker.git DEV: Allow booting app with slim image and make default for aarch46 --- diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5bc361d..9dbf8aa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -137,17 +137,11 @@ jobs: --tag discourse/base:aarch64-slim docker tag discourse/base:aarch64-slim localhost:5000/discourse/base:aarch64-slim docker push localhost:5000/discourse/base:aarch64-slim - - name: build release image + - name: release slim image as release working-directory: image/base run: | - docker buildx create --name builder --use --driver-opt network=host - docker buildx build . --load \ - -f release.Dockerfile \ - --platform linux/arm64 \ - --network=host \ - --build-arg from=localhost:5000/discourse/base \ - --build-arg tag=aarch64-slim \ - --tag discourse/base:aarch64 + docker tag discourse/base:aarch64 localhost:5000/discourse/base:aarch64-slim + docker push localhost:5000/discourse/base:aarch64 - name: Print summary run: docker images discourse/base - name: push to dockerhub diff --git a/templates/web.template.yml b/templates/web.template.yml index 3bd3c8c..9e645e6 100644 --- a/templates/web.template.yml +++ b/templates/web.template.yml @@ -106,7 +106,7 @@ run: - bash -c "ln -s /shared/tmp/{backups,restores} $home/tmp" - chown -R discourse:www-data /shared/log/rails /shared/uploads /shared/backups /shared/tmp # scrub broken symlinks from plugins that have been removed - - find public/plugins/ -maxdepth 1 -xtype l -delete + - "[ ! -d public/plugins ] || find public/plugins/ -maxdepth 1 -xtype l -delete" - exec: cmd: @@ -156,7 +156,7 @@ run: - exec: cd: $home cmd: - - "[ ! -d 'node_modules' ] || su discourse -c 'yarn install --production --frozen-lockfile && yarn cache clean'" + - su discourse -c 'yarn install --production --frozen-lockfile && yarn cache clean' - exec: cd: $home