From 7aa0f9f50d35b53881fb4bec520d5fd95fe1f832 Mon Sep 17 00:00:00 2001 From: Leon Schmidt <50419884+MexHigh@users.noreply.github.com> Date: Mon, 23 May 2022 14:06:04 +0200 Subject: [PATCH] Make PUBLIC_URL and REACT_APP_SERVER configurable (#266) * Adjust Dockerfile to include args in build process * Adjust README.md --- Dockerfile | 5 ++++- README.md | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 92ce546..a5d5171 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,14 @@ # Builder FROM node:lts as builder +ARG PUBLIC_URL=/ +ARG REACT_APP_SERVER + WORKDIR /src COPY . /src RUN yarn --network-timeout=100000 install -RUN yarn build +RUN PUBLIC_URL=$PUBLIC_URL REACT_APP_SERVER=$REACT_APP_SERVER yarn build # App diff --git a/README.md b/README.md index 85ee974..383df88 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,9 @@ or by editing it in the [.env](.env) file. See also the context: https://github.com/Awesome-Technologies/synapse-admin.git # args: # - NODE_OPTIONS="--max_old_space_size=1024" + # # see #266 + # - PUBLIC_URL="/synapse-admin" + # - REACT_APP_SERVER="https://matrix.example.com" ports: - "8080:80" restart: unless-stopped