From f5fd949e18c18e4d89d5d044a029d82af44eab78 Mon Sep 17 00:00:00 2001 From: Stanislas Lange Date: Sat, 29 May 2021 21:53:38 +0000 Subject: [PATCH] fix(docker): get API endpoint from env --- .github/workflows/release.yml | 1 + Dockerfile | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3c179c6..dab20da 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,6 +23,7 @@ jobs: registry: rg.fr-par.scw.cloud/codebench username: nologin password: ${{ secrets.SCW_SECRET_KEY }} + build-args: REACT_APP_API_ENDPOINT=https://api.codebench.dev - name: Build and push uses: docker/build-push-action@v2 with: diff --git a/Dockerfile b/Dockerfile index dddea77..bdb2815 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,9 @@ FROM node:16-alpine as build-step +ARG REACT_APP_API_ENDPOINT + +ENV REACT_APP_API_ENDPOINT $REACT_APP_API_ENDPOINT + RUN mkdir /app WORKDIR /app COPY package.json /app