Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[.github] - chore: debugging logs front docker #9400

Merged
merged 2 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 16 additions & 10 deletions front/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@ FROM node:20.13.0 AS front

RUN apt-get update && apt-get install -y vim redis-tools postgresql-client htop

ARG COMMIT_HASH
ARG NEXT_PUBLIC_VIZ_URL
ARG NEXT_PUBLIC_GA_TRACKING_ID
ARG NEXT_PUBLIC_DUST_CLIENT_FACING_URL

RUN echo "Build arguments received:" && \
echo "COMMIT_HASH=$COMMIT_HASH" && \
echo "NEXT_PUBLIC_VIZ_URL=$NEXT_PUBLIC_VIZ_URL" && \
echo "NEXT_PUBLIC_GA_TRACKING_ID=$NEXT_PUBLIC_GA_TRACKING_ID" && \
echo "NEXT_PUBLIC_DUST_CLIENT_FACING_URL=$NEXT_PUBLIC_DUST_CLIENT_FACING_URL"

ENV NEXT_PUBLIC_COMMIT_HASH=$COMMIT_HASH
ENV NEXT_PUBLIC_VIZ_URL=$NEXT_PUBLIC_VIZ_URL
ENV NEXT_PUBLIC_GA_TRACKING_ID=$NEXT_PUBLIC_GA_TRACKING_ID
ENV NEXT_PUBLIC_DUST_CLIENT_FACING_URL=$NEXT_PUBLIC_DUST_CLIENT_FACING_URL

WORKDIR /types
COPY /types/package*.json ./
COPY /types/ .
Expand All @@ -21,16 +37,6 @@ RUN npm ci

COPY /front .

ARG COMMIT_HASH
ARG NEXT_PUBLIC_VIZ_URL
ARG NEXT_PUBLIC_GA_TRACKING_ID
ARG NEXT_PUBLIC_DUST_CLIENT_FACING_URL

ENV NEXT_PUBLIC_COMMIT_HASH=$COMMIT_HASH
ENV NEXT_PUBLIC_VIZ_URL=$NEXT_PUBLIC_VIZ_URL
ENV NEXT_PUBLIC_GA_TRACKING_ID=$NEXT_PUBLIC_GA_TRACKING_ID
ENV NEXT_PUBLIC_DUST_CLIENT_FACING_URL=$NEXT_PUBLIC_DUST_CLIENT_FACING_URL

# fake database URIs are needed because Sequelize will throw if the `url` parameter
# is undefined, and `next build` imports the `models.ts` file while "Collecting page data"
RUN FRONT_DATABASE_URI="sqlite:foo.sqlite" npm run build
Expand Down
3 changes: 3 additions & 0 deletions k8s/cloudbuild_tmp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ steps:
build_args+=("--build-arg" "${key}=${value}")
fi
done < <(yq .env -o=props .github/configs/${_REGION}.yaml)

echo "BUILD ARGUMENTS:"
echo ${build_args[@]}

depot build \
--project 3vz0lnf16v \
Expand Down
Loading