Skip to content

Commit

Permalink
misc(ci/cd): Add missing BASE_URL environtment
Browse files Browse the repository at this point in the history
  • Loading branch information
xyzuan committed Nov 5, 2024
1 parent 5841d02 commit 1cc63a7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
echo "SHA=$(echo "$GITHUB_SHA" | head -c 7)" >> $GITHUB_ENV
echo "ENV=dev" >> $GITHUB_ENV
echo "PORT=3121" >> $GITHUB_ENV
echo "BASE_URL=https://api.xyzuan.my.id/dev" >> $GITHUB_ENV
echo "CT_NAME=xyzuan-api-v2-dev" >> $GITHUB_ENV
echo "DOMAIN=xyzuan.my.id" >> $GITHUB_ENV
echo "REGISTRY=ghcr.io/xyzuan" >> $GITHUB_ENV
Expand All @@ -41,6 +42,7 @@ jobs:
docker build \
--build-arg PORT=${{ env.PORT }} \
--build-arg NODE_ENV=${{ env.ENV }} \
--build-arg BASE_URL=${{ env.BASE_URL }} \
--build-arg DOMAIN=${{ env.DOMAIN }} \
--build-arg PASSWORD_PEPPER=${{ secrets.PASSWORD_PEPPER }} \
--build-arg DATABASE_URL=${{ secrets.DATABASE_URL_DEV }} \
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
echo "SHA=$(echo "$GITHUB_SHA" | head -c 7)" >> $GITHUB_ENV
echo "ENV=production" >> $GITHUB_ENV
echo "PORT=3131" >> $GITHUB_ENV
echo "BASE_URL=https://api.xyzuan.my.id" >> $GITHUB_ENV
echo "CT_NAME=xyzuan-api-v2" >> $GITHUB_ENV
echo "DOMAIN=xyzuan.my.id" >> $GITHUB_ENV
echo "REGISTRY=ghcr.io/xyzuan" >> $GITHUB_ENV
Expand All @@ -41,6 +42,7 @@ jobs:
docker build \
--build-arg PORT=${{ env.PORT }} \
--build-arg NODE_ENV=${{ env.ENV }} \
--build-arg BASE_URL=${{ env.BASE_URL }} \
--build-arg DOMAIN=${{ env.DOMAIN }} \
--build-arg PASSWORD_PEPPER=${{ secrets.PASSWORD_PEPPER }} \
--build-arg DATABASE_URL=${{ secrets.DATABASE_URL_DEV }} \
Expand Down
2 changes: 2 additions & 0 deletions misc/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ COPY --from=build /app/node_modules/@prisma /app/node_modules/@prisma

ARG PORT
ARG NODE_ENV
ARG BASE_URL
ARG DOMAIN
ARG PASSWORD_PEPPER
ARG DATABASE_URL
Expand All @@ -50,6 +51,7 @@ ARG CLOUDINARY_API_SECRET

ENV PORT=$PORT
ENV NODE_ENV=$NODE_ENV
ENV BASE_URL=$BASE_URL
ENV DOMAIN=$DOMAIN
ENV PASSWORD_PEPPER=$PASSWORD_PEPPER
ENV DATABASE_URL=$DATABASE_URL
Expand Down
2 changes: 2 additions & 0 deletions misc/Dockerfile.prod
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ COPY --from=build /app/node_modules/@prisma /app/node_modules/@prisma

ARG PORT
ARG NODE_ENV
ARG BASE_URL
ARG DOMAIN
ARG PASSWORD_PEPPER
ARG DATABASE_URL
Expand All @@ -50,6 +51,7 @@ ARG CLOUDINARY_API_SECRET

ENV PORT=$PORT
ENV NODE_ENV=$NODE_ENV
ENV BASE_URL=$BASE_URL
ENV DOMAIN=$DOMAIN
ENV PASSWORD_PEPPER=$PASSWORD_PEPPER
ENV DATABASE_URL=$DATABASE_URL
Expand Down

0 comments on commit 1cc63a7

Please sign in to comment.