Skip to content

Commit 84c753e

Browse files
authored
Fix/breardon2011/UI arch lock (#2355)
* adjust arch lock * bump chart * adjust docker
1 parent 18b7015 commit 84c753e

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

taco/Dockerfile_statesman

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ FROM ubuntu:24.04 AS runner
2727
ARG COMMIT_SHA
2828
WORKDIR /app
2929

30-
# Install ca-certificates, curl for HTTPS requests
30+
# Install ca-certificates, curl, jq for HTTPS requests and URL encoding
3131
RUN apt-get update && \
32-
apt-get install -y ca-certificates curl && \
32+
apt-get install -y ca-certificates curl jq && \
3333
apt-get clean && \
3434
rm -rf /var/lib/apt/lists/*
3535

taco/Dockerfile_token_service

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ COPY cmd/token_service/ ./cmd/token_service/
1010
COPY internal/ ./internal/
1111

1212
# Download dependencies and build
13+
# Note: CGO is required for SQLite support
1314
RUN cd cmd/token_service && \
1415
go mod tidy && \
15-
CGO_ENABLED=0 GOOS=linux go build \
16+
CGO_ENABLED=1 GOOS=linux go build \
1617
-ldflags="-X 'main.Version=${COMMIT_SHA}' -s -w" \
17-
-a -installsuffix cgo \
18+
-a \
1819
-o token_service .
1920

2021
# Multi-stage build - use a minimal image for runtime

taco/scripts/entrypoint.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ atlas migrate hash --dir "file:///app/migrations/sqlite" 2>/dev/null || true
1616
case $BACKEND in
1717
postgres)
1818
echo "Applying PostgreSQL migrations..."
19-
DB_URL="postgres://${OPENTACO_POSTGRES_USER}:${OPENTACO_POSTGRES_PASSWORD}@${OPENTACO_POSTGRES_HOST}:${OPENTACO_POSTGRES_PORT}/${OPENTACO_POSTGRES_DATABASE}?sslmode=${OPENTACO_POSTGRES_SSLMODE:-disable}"
19+
# URL-encode the password to handle special characters
20+
ENCODED_PASSWORD=$(printf '%s' "$OPENTACO_POSTGRES_PASSWORD" | jq -sRr @uri)
21+
DB_URL="postgres://${OPENTACO_POSTGRES_USER}:${ENCODED_PASSWORD}@${OPENTACO_POSTGRES_HOST}:${OPENTACO_POSTGRES_PORT}/${OPENTACO_POSTGRES_DATABASE}?sslmode=${OPENTACO_POSTGRES_SSLMODE:-disable}"
2022
atlas migrate apply --url "$DB_URL" --dir "file:///app/migrations/postgres"
2123
;;
2224
mysql)

0 commit comments

Comments
 (0)