File tree Expand file tree Collapse file tree 3 files changed +30
-4
lines changed
Expand file tree Collapse file tree 3 files changed +30
-4
lines changed Original file line number Diff line number Diff line change @@ -69,14 +69,23 @@ jobs:
6969 echo "version=${GIT_HASH}-amd64" >> $GITHUB_OUTPUT
7070 fi
7171
72- - name : Build and push
72+ - name : Build and push countryconfig image
7373 uses : docker/build-push-action@v6
7474 with :
7575 push : true
7676 context : .
7777 tags : |
7878 ${{ secrets.DOCKERHUB_ACCOUNT}}/${{ secrets.DOCKERHUB_REPO }}:${{ steps.country_config.outputs.version }}
7979
80+ - name : Build and push metabase assets image
81+ uses : docker/build-push-action@v6
82+ with :
83+ push : true
84+ context : .
85+ file : ./Dockerfile.metabase.assets
86+ tags : |
87+ ${{ secrets.DOCKERHUB_ACCOUNT}}/${{ secrets.DOCKERHUB_REPO }}:${{ steps.country_config.outputs.version }}-assets
88+
8089 merge-manifest :
8190 needs : [build]
8291 runs-on : ubuntu-latest
@@ -98,11 +107,17 @@ jobs:
98107 # Create manifest list based on whether ARM build exists
99108 if [[ "$BUILD_ARM" == "true" ]]; then
100109 MANIFEST_LIST="$REPO:$TAG-amd64 $REPO:$TAG-arm64"
110+ ASSETS_MANIFEST_LIST="$REPO:$TAG-amd64-assets $REPO:$TAG-arm64-assets"
101111 else
102112 MANIFEST_LIST="$REPO:$TAG-amd64"
113+ ASSETS_MANIFEST_LIST="$REPO:$TAG-amd64-assets"
103114 fi
104115
105116 echo "[🔁 pushing ] $REPO:$TAG"
106117 docker manifest create $REPO:$TAG \
107118 $MANIFEST_LIST
108119 docker manifest push $REPO:$TAG
120+ echo "[🔁 pushing ] $REPO:$TAG-assets"
121+ docker manifest create $REPO:$TAG-assets \
122+ $ASSETS_MANIFEST_LIST
123+ docker manifest push $REPO:$TAG-assets
Original file line number Diff line number Diff line change 1+ FROM alpine:3.20
2+
3+ # Directory inside the assets image
4+ WORKDIR /assets
5+
6+ # Copy assets
7+ COPY infrastructure/metabase /assets/
8+
9+ RUN chmod +x /assets/*.sh
Original file line number Diff line number Diff line change 88#
99# Copyright (C) The OpenCRVS Authors located at https://github.com/opencrvs/opencrvs-core/blob/master/AUTHORS.
1010
11- #! /bin/bash
11+ SCRIPT_FULL_PATH=$( readlink -f $0 )
12+ SCRIPT_DIR=$( dirname " $SCRIPT_FULL_PATH " )
13+ echo " Running Metabase initialization script from ${SCRIPT_DIR} "
1214
1315if [ -z " ${OPENCRVS_METABASE_SITE_NAME} " ]; then
1416 echo " Error: OPENCRVS_METABASE_SITE_NAME environment variable is not defined"
@@ -106,8 +108,8 @@ export OPENCRVS_METABASE_ADMIN_PASSWORD_SALT=$(uuidgen)
106108SALT_AND_PASSWORD=$OPENCRVS_METABASE_ADMIN_PASSWORD_SALT$OPENCRVS_METABASE_ADMIN_PASSWORD
107109export OPENCRVS_METABASE_ADMIN_PASSWORD_HASH=$( java -cp $METABASE_JAR clojure.main -e " (require 'metabase.util.password) (println (metabase.util.password/hash-bcrypt \" $SALT_AND_PASSWORD \" ))" 2> /dev/null | tail -n 1)
108110
109- source /initialize-database.sh
110- source /update-database.sh
111+ source ${SCRIPT_DIR} /initialize-database.sh
112+ source ${SCRIPT_DIR} /update-database.sh
111113
112114echo " Starting metabase..."
113115
You can’t perform that action at this time.
0 commit comments