Skip to content

Commit a71a435

Browse files
committed
feat: Build shared assets image for countryconfig assets
1 parent f08389c commit a71a435

File tree

4 files changed

+14
-12
lines changed

4 files changed

+14
-12
lines changed

.github/workflows/publish-to-dockerhub.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,12 @@ jobs:
7777
tags: |
7878
${{ secrets.DOCKERHUB_ACCOUNT}}/${{ secrets.DOCKERHUB_REPO }}:${{ steps.country_config.outputs.version }}
7979
80-
- name: Build and push metabase assets image
80+
- name: Build and push assets image
8181
uses: docker/build-push-action@v6
8282
with:
8383
push: true
8484
context: .
85-
file: ./Dockerfile.metabase.assets
85+
file: ./Dockerfile.assets
8686
tags: |
8787
${{ secrets.DOCKERHUB_ACCOUNT}}/${{ secrets.DOCKERHUB_REPO }}:${{ steps.country_config.outputs.version }}-assets
8888

Dockerfile.assets

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM alpine:3.20
2+
3+
# Directory inside the assets image
4+
WORKDIR /assets
5+
6+
# Copy assets
7+
COPY infrastructure/metabase /assets/metabase
8+
COPY infrastructure/postgres /assets/postgres
9+
10+
RUN chmod +x /assets/metabase/*.sh \
11+
/assets/postgres/*.sh

Dockerfile.metabase.assets

Lines changed: 0 additions & 9 deletions
This file was deleted.

infrastructure/postgres/setup-analytics.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ set -euo pipefail
1414
: "${POSTGRES_PASSWORD:?Must set POSTGRES_PASSWORD}"
1515
: "${KEEP_ALIVE_SECONDS:=0}" # Prevent Swarm from marking this task as failed due to early exit
1616

17-
TARGET_DB="events"
17+
TARGET_DB=${TARGET_DB-"events"}
1818

1919
echo "Waiting for PostgreSQL to be ready at ${POSTGRES_HOST}:${POSTGRES_PORT}..."
2020
until PGPASSWORD="$POSTGRES_PASSWORD" psql -h "$POSTGRES_HOST" -p "$POSTGRES_PORT" \

0 commit comments

Comments
 (0)