Edit env vars
This commit is contained in:
parent
d5312fd4fd
commit
68826aa1d0
1
.env
1
.env
@ -1,4 +1,3 @@
|
|||||||
REACT_APP_BROKER_URL=http://localhost:9000
|
REACT_APP_BROKER_URL=http://localhost:9000
|
||||||
REACT_APP_ICE_SERVERS_URL=http://localhost:9000/iceservers
|
|
||||||
REACT_APP_VERSION=$npm_package_version
|
REACT_APP_VERSION=$npm_package_version
|
||||||
REACT_APP_MAINTENANCE=false
|
REACT_APP_MAINTENANCE=false
|
||||||
|
@ -17,7 +17,6 @@ services:
|
|||||||
- 3000:3000
|
- 3000:3000
|
||||||
environment:
|
environment:
|
||||||
REACT_APP_BROKER_URL: "http://localhost:9000"
|
REACT_APP_BROKER_URL: "http://localhost:9000"
|
||||||
REACT_APP_ICE_SERVERS_URL: "http://localhost:9000/iceservers"
|
|
||||||
REACT_APP_VERSION: "1.10.2"
|
REACT_APP_VERSION: "1.10.2"
|
||||||
REACT_APP_MAINTENANCE: "false"
|
REACT_APP_MAINTENANCE: "false"
|
||||||
|
|
||||||
|
14
render.yaml
14
render.yaml
@ -23,10 +23,20 @@ services:
|
|||||||
- path: /*
|
- path: /*
|
||||||
name: X-Robots-Tag
|
name: X-Robots-Tag
|
||||||
value: noindex
|
value: noindex
|
||||||
|
envVars:
|
||||||
|
- key: REACT_APP_BROKER_URL
|
||||||
|
fromService:
|
||||||
|
type: web
|
||||||
|
name: "Owlbear Rodeo Backend"
|
||||||
|
envVarKey: RENDER_EXTERNAL_URL
|
||||||
|
- key: REACT_APP_MAINTENANCE
|
||||||
|
value: false
|
||||||
|
- key: REACT_APP_VERSION
|
||||||
|
value: "1.10.2"
|
||||||
# A Docker web service
|
# A Docker web service
|
||||||
- type: web
|
- type: web
|
||||||
name: Owlbear Rodeo Backend
|
name: Owlbear Rodeo Backend
|
||||||
env: docker
|
runtime: docker
|
||||||
region: oregon # optional (defaults to oregon) check other regions here: https://render.com/docs/regions
|
region: oregon # optional (defaults to oregon) check other regions here: https://render.com/docs/regions
|
||||||
plan: free
|
plan: free
|
||||||
branch: "feature/open-source" # optional (defaults to master)
|
branch: "feature/open-source" # optional (defaults to master)
|
||||||
@ -36,6 +46,6 @@ services:
|
|||||||
healthCheckPath: /health
|
healthCheckPath: /health
|
||||||
envVars:
|
envVars:
|
||||||
- key: ORIGIN_WHITELIST
|
- key: ORIGIN_WHITELIST
|
||||||
value: $RENDER_EXTERNAL_HOSTNAME
|
value: RENDER_EXTERNAL_HOSTNAME
|
||||||
- key: PORT
|
- key: PORT
|
||||||
value: 9000
|
value: 9000
|
@ -64,7 +64,7 @@ class Session extends EventEmitter {
|
|||||||
async connect() {
|
async connect() {
|
||||||
try {
|
try {
|
||||||
if (
|
if (
|
||||||
!process.env.REACT_APP_ICE_SERVERS_URL ||
|
!process.env.REACT_APP_BROKER_URL ||
|
||||||
process.env.REACT_APP_MAINTENANCE === "true"
|
process.env.REACT_APP_MAINTENANCE === "true"
|
||||||
) {
|
) {
|
||||||
this.emit("status", "offline");
|
this.emit("status", "offline");
|
||||||
@ -75,7 +75,9 @@ class Session extends EventEmitter {
|
|||||||
parser: msgParser,
|
parser: msgParser,
|
||||||
transports: ["websocket"],
|
transports: ["websocket"],
|
||||||
});
|
});
|
||||||
const response = await fetch(process.env.REACT_APP_ICE_SERVERS_URL);
|
const response = await fetch(
|
||||||
|
`${process.env.REACT_APP_BROKER_URL}/iceservers`
|
||||||
|
);
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
throw Error("Unable to fetch ICE servers");
|
throw Error("Unable to fetch ICE servers");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user