Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/build_containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ jobs:
set -ux
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
pushd frontend
echo "NEXT_PUBLIC_API_URL=http://k8s-wn-01.cam.uchc.edu:30001" > .env
docker build \
--no-cache \
--build-arg NEXT_PUBLIC_API_URL=/api \
--file Dockerfile \
--tag ghcr.io/virtualcell/vcell-ai-frontend:${TAG_NAME} \
--label org.opencontainers.image.created=${CREATED} \
Expand Down
13 changes: 9 additions & 4 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,17 @@ WORKDIR /app
COPY package.json package-lock.json* pnpm-lock.yaml* ./
RUN npm install

# 4. Copy .env file
COPY .env ./

# 5. Copy the rest of the app
# 4. Copy the rest of the app
COPY . .

# 5. NEXT_PUBLIC_* vars are inlined into the browser bundle at build time. Default
# to a RELATIVE "/api" so the browser calls the same origin it's served from — the
# ingress routes /api -> backend — which makes ONE image work in every environment
# (dev/prod/local). Override with --build-arg NEXT_PUBLIC_API_URL=<absolute-url>
# only if the frontend is served on a different origin than the API.
ARG NEXT_PUBLIC_API_URL=/api
ENV NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL}

# 6. Expose the dev server port
EXPOSE 3000

Expand Down
Loading