Make PUBLIC_URL and REACT_APP_SERVER configurable (#266)

* Adjust Dockerfile to include args in build process
* Adjust README.md
This commit is contained in:
Leon Schmidt 2022-05-23 14:06:04 +02:00 committed by GitHub
parent 5aa90c25f7
commit 7aa0f9f50d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View file

@ -1,11 +1,14 @@
# Builder # Builder
FROM node:lts as builder FROM node:lts as builder
ARG PUBLIC_URL=/
ARG REACT_APP_SERVER
WORKDIR /src WORKDIR /src
COPY . /src COPY . /src
RUN yarn --network-timeout=100000 install RUN yarn --network-timeout=100000 install
RUN yarn build RUN PUBLIC_URL=$PUBLIC_URL REACT_APP_SERVER=$REACT_APP_SERVER yarn build
# App # App

View file

@ -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 context: https://github.com/Awesome-Technologies/synapse-admin.git
# args: # args:
# - NODE_OPTIONS="--max_old_space_size=1024" # - NODE_OPTIONS="--max_old_space_size=1024"
# # see #266
# - PUBLIC_URL="/synapse-admin"
# - REACT_APP_SERVER="https://matrix.example.com"
ports: ports:
- "8080:80" - "8080:80"
restart: unless-stopped restart: unless-stopped