DEV: Allow booting app with slim image and make default for aarch46
authorDavid Taylor <david@taylorhq.com>
Fri, 30 Dec 2022 12:45:32 +0000 (12:45 +0000)
committerRafael dos Santos Silva <xfalcox@gmail.com>
Mon, 2 Jan 2023 14:58:49 +0000 (11:58 -0300)
.github/workflows/build.yml
templates/web.template.yml

index 5bc361dc00b1313d07c74e32be8f7cde5bbf77d2..9dbf8aa5a8dcf98ef9833adcdbaf8ef445717de4 100644 (file)
@@ -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
index 3bd3c8c2f614682054ecfd3ad7180addcca879f0..9e645e6c5f93bc4a71526087b4975c103cbd6e5c 100644 (file)
@@ -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