Skip to content

Commit

Permalink
Merge pull request #626 from Gencaster/sentry-fixes
Browse files Browse the repository at this point in the history
Add public IP to allowed_hosts
  • Loading branch information
capital-G authored Nov 29, 2023
2 parents 5bc215c + 4bcfa76 commit 3d4f4e4
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 2 deletions.
4 changes: 4 additions & 0 deletions caster-back/gencaster/settings/deploy_dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Settings for deploying "*production*" dev environment on the server via Docker.
"""
import os

import sentry_sdk
from sentry_sdk.integrations.django import DjangoIntegration
Expand All @@ -28,6 +29,9 @@
"127.0.0.1",
]

if public_ip := os.environ.get("BACKEND_PUBLIC_IP"):
ALLOWED_HOSTS += [public_ip]

CORS_ALLOWED_ORIGINS = [
"https://editor.dev.gencaster.org",
"https://dev.gencaster.org",
Expand Down
4 changes: 4 additions & 0 deletions caster-back/gencaster/settings/deploy_live.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
"127.0.0.1",
]

if public_ip := os.environ.get("BACKEND_PUBLIC_IP"):
ALLOWED_HOSTS += [public_ip]


CORS_ALLOWED_ORIGINS = [
"https://editor.live.gencaster.org",
"https://live.gencaster.org",
Expand Down
3 changes: 2 additions & 1 deletion vars.deploy.dev.env
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ BACKEND_OSC_HOST=osc_backend
# this is needed during build time so change it in
# docker-compose.deploy.dev.yml as well if this changes
BACKEND_URL="https://backend.dev.gencaster.org"
BACKEND_PUBLIC_IP=88.99.60.112

JANUS_PUBLIC_IP=195.201.163.94
JANUS_PUBLIC_IP=88.99.60.112

SUPERCOLLIDER_USE_INPUT=1
SUPERCOLLIDER_NUM_STREAMS=15
Expand Down
1 change: 1 addition & 0 deletions vars.deploy.live.env
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ BACKEND_OSC_HOST=osc_backend
# this is needed during build time so change it in
# docker-compose.deploy.dev.yml as well if this changes
BACKEND_URL="https://backend.live.gencaster.org"
BACKEND_PUBLIC_IP=213.133.101.74

JANUS_PUBLIC_IP=213.133.101.74

Expand Down
1 change: 0 additions & 1 deletion vars.env
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ BACKEND_OSC_PORT=7000

SUPERCOLLIDER_HOST=sound
SUPERCOLLIDER_PORT=57120
SUPERCOLLIEDR_PUBLIC_IP=127.0.0.1
SUPERCOLLIDER_USE_INPUT=0
SUPERCOLLIDER_NUM_STREAMS=2

Expand Down

0 comments on commit 3d4f4e4

Please sign in to comment.