Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

Commit 56c2b86

Browse files
committed
fix: custom dockerfile
1 parent 667a363 commit 56c2b86

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ RUN --mount=type=secret,id=sentry_auth_token \
7575

7676
# Runner
7777
FROM ${NODE_IMAGE} AS runner
78-
RUN apt-get update && apt-get install -y openssl netcat-openbsd ca-certificates
78+
RUN apt-get update && apt-get install -y openssl netcat-openbsd ca-certificates gettext-base
7979
WORKDIR /triggerdotdev
8080
ENV NODE_ENV=production
8181

docker/scripts/entrypoint.sh

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,19 @@ if [ -n "$CLICKHOUSE_URL" ] && [ "$SKIP_CLICKHOUSE_MIGRATIONS" != "1" ]; then
1818
echo "Running ClickHouse migrations..."
1919
export GOOSE_DRIVER=clickhouse
2020

21+
# Expand any embedded environment variables (e.g., ${CLICKHOUSE_PASSWORD} when using existingSecret)
22+
EXPANDED_CLICKHOUSE_URL=$(echo "$CLICKHOUSE_URL" | envsubst)
23+
2124
# Ensure secure=true is in the connection string
22-
if echo "$CLICKHOUSE_URL" | grep -q "secure="; then
25+
if echo "$EXPANDED_CLICKHOUSE_URL" | grep -q "secure="; then
2326
# secure parameter already exists, use as is
24-
export GOOSE_DBSTRING="$CLICKHOUSE_URL"
25-
elif echo "$CLICKHOUSE_URL" | grep -q "?"; then
27+
export GOOSE_DBSTRING="$EXPANDED_CLICKHOUSE_URL"
28+
elif echo "$EXPANDED_CLICKHOUSE_URL" | grep -q "?"; then
2629
# URL has query parameters, append secure=true
27-
export GOOSE_DBSTRING="${CLICKHOUSE_URL}&secure=true"
30+
export GOOSE_DBSTRING="${EXPANDED_CLICKHOUSE_URL}&secure=true"
2831
else
2932
# URL has no query parameters, add secure=true
30-
export GOOSE_DBSTRING="${CLICKHOUSE_URL}?secure=true"
33+
export GOOSE_DBSTRING="${EXPANDED_CLICKHOUSE_URL}?secure=true"
3134
fi
3235

3336
export GOOSE_MIGRATION_DIR=/triggerdotdev/internal-packages/clickhouse/schema
@@ -45,6 +48,16 @@ cp node_modules/@prisma/engines/*.node apps/webapp/prisma/
4548

4649
cd /triggerdotdev/apps/webapp
4750

51+
# Expand any embedded environment variables in ClickHouse URLs (e.g., ${CLICKHOUSE_PASSWORD} when using existingSecret)
52+
if [ -n "$CLICKHOUSE_URL" ]; then
53+
export CLICKHOUSE_URL=$(echo "$CLICKHOUSE_URL" | envsubst)
54+
fi
55+
if [ -n "$RUN_REPLICATION_CLICKHOUSE_URL" ]; then
56+
export RUN_REPLICATION_CLICKHOUSE_URL=$(echo "$RUN_REPLICATION_CLICKHOUSE_URL" | envsubst)
57+
fi
58+
if [ -n "$EVENTS_CLICKHOUSE_URL" ]; then
59+
export EVENTS_CLICKHOUSE_URL=$(echo "$EVENTS_CLICKHOUSE_URL" | envsubst)
60+
fi
4861

4962
# Decide how much old-space memory Node should get.
5063
# Use $NODE_MAX_OLD_SPACE_SIZE if it’s set; otherwise fall back to 8192.

0 commit comments

Comments
 (0)