Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add public IP to allowed_hosts #626

Merged
merged 3 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading