Merge pull request #686 from openreplay/api-v1.7.0_patch
Api v1.7.0 patch
This commit is contained in:
commit
781a5258f3
15 changed files with 31 additions and 24 deletions
|
|
@ -8,6 +8,7 @@ ARG envarg
|
|||
# Startup daemon
|
||||
ENV SOURCE_MAP_VERSION=0.7.4 \
|
||||
APP_NAME=chalice \
|
||||
LISTEN_PORT=8000 \
|
||||
ENTERPRISE_BUILD=${envarg}
|
||||
|
||||
ADD https://unpkg.com/source-map@${SOURCE_MAP_VERSION}/lib/mappings.wasm /mappings.wasm
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ ARG envarg
|
|||
ENV APP_NAME=alerts \
|
||||
pg_minconn=1 \
|
||||
pg_maxconn=10 \
|
||||
LISTEN_PORT=8000 \
|
||||
ENTERPRISE_BUILD=${envarg}
|
||||
|
||||
COPY requirements.txt /work_tmp/requirements.txt
|
||||
|
|
|
|||
|
|
@ -45,8 +45,8 @@ def get_live_sessions_ws(project_id, body: schemas.LiveSessionsSearchPayloadSche
|
|||
def __get_live_sessions_ws(project_id, data):
|
||||
project_key = projects.get_project_key(project_id)
|
||||
try:
|
||||
connected_peers = requests.post(config("assist") % config("S3_KEY") + f"/{project_key}", json=data,
|
||||
timeout=config("assistTimeout", cast=int, default=5))
|
||||
connected_peers = requests.post(config("ASSIST_URL") + config("assist") % config("S3_KEY") + f"/{project_key}",
|
||||
json=data, timeout=config("assistTimeout", cast=int, default=5))
|
||||
if connected_peers.status_code != 200:
|
||||
print("!! issue with the peer-server")
|
||||
print(connected_peers.text)
|
||||
|
|
@ -76,8 +76,9 @@ def __get_live_sessions_ws(project_id, data):
|
|||
def get_live_session_by_id(project_id, session_id):
|
||||
project_key = projects.get_project_key(project_id)
|
||||
try:
|
||||
connected_peers = requests.get(config("assist") % config("S3_KEY") + f"/{project_key}/{session_id}",
|
||||
timeout=config("assistTimeout", cast=int, default=5))
|
||||
connected_peers = requests.get(
|
||||
config("ASSIST_URL") + config("assist") % config("S3_KEY") + f"/{project_key}/{session_id}",
|
||||
timeout=config("assistTimeout", cast=int, default=5))
|
||||
if connected_peers.status_code != 200:
|
||||
print("!! issue with the peer-server")
|
||||
print(connected_peers.text)
|
||||
|
|
@ -105,8 +106,9 @@ def is_live(project_id, session_id, project_key=None):
|
|||
if project_key is None:
|
||||
project_key = projects.get_project_key(project_id)
|
||||
try:
|
||||
connected_peers = requests.get(config("assistList") % config("S3_KEY") + f"/{project_key}/{session_id}",
|
||||
timeout=config("assistTimeout", cast=int, default=5))
|
||||
connected_peers = requests.get(
|
||||
config("ASSIST_URL") + config("assistList") % config("S3_KEY") + f"/{project_key}/{session_id}",
|
||||
timeout=config("assistTimeout", cast=int, default=5))
|
||||
if connected_peers.status_code != 200:
|
||||
print("!! issue with the peer-server")
|
||||
print(connected_peers.text)
|
||||
|
|
@ -133,8 +135,9 @@ def autocomplete(project_id, q: str, key: str = None):
|
|||
if key:
|
||||
params["key"] = key
|
||||
try:
|
||||
results = requests.get(config("assistList") % config("S3_KEY") + f"/{project_key}/autocomplete",
|
||||
params=params, timeout=config("assistTimeout", cast=int, default=5))
|
||||
results = requests.get(
|
||||
config("ASSIST_URL") + config("assistList") % config("S3_KEY") + f"/{project_key}/autocomplete",
|
||||
params=params, timeout=config("assistTimeout", cast=int, default=5))
|
||||
if results.status_code != 200:
|
||||
print("!! issue with the peer-server")
|
||||
print(results.text)
|
||||
|
|
|
|||
|
|
@ -2,4 +2,4 @@
|
|||
cd sourcemap-reader
|
||||
nohup npm start &> /tmp/sourcemap-reader.log &
|
||||
cd ..
|
||||
uvicorn app:app --host 0.0.0.0 --reload --proxy-headers
|
||||
uvicorn app:app --host 0.0.0.0 --port $LISTEN_PORT --reload --proxy-headers
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
uvicorn app:app --host 0.0.0.0 --reload
|
||||
uvicorn app:app --host 0.0.0.0 --port $LISTEN_PORT --reload
|
||||
|
|
|
|||
|
|
@ -11,9 +11,7 @@ S3_HOST=
|
|||
S3_KEY=
|
||||
S3_SECRET=
|
||||
SITE_URL=
|
||||
alert_ntf=http://127.0.0.1:8000/async/alerts/notifications/%s
|
||||
announcement_url=
|
||||
assign_link=http://127.0.0.1:8000/async/email_assignment
|
||||
async_Token=
|
||||
captcha_key=
|
||||
captcha_server=
|
||||
|
|
@ -28,8 +26,9 @@ jwt_algorithm=HS512
|
|||
jwt_exp_delta_seconds=2592000
|
||||
jwt_issuer=openreplay-default-foss
|
||||
jwt_secret="SET A RANDOM STRING HERE"
|
||||
assist=http://assist-openreplay.app.svc.cluster.local:9001/assist/%s/sockets-live
|
||||
assistList=http://assist-openreplay.app.svc.cluster.local:9001/assist/%s/sockets-list
|
||||
ASSIST_URL=http://assist-openreplay.app.svc.cluster.local:9001
|
||||
assist=/assist/%s/sockets-live
|
||||
assistList=/assist/%s/sockets-list
|
||||
pg_dbname=postgres
|
||||
pg_host=postgresql.db.svc.cluster.local
|
||||
pg_password=asayerPostgres
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ RUN apk add --no-cache build-base libressl libffi-dev libressl-dev libxslt-dev l
|
|||
ARG envarg
|
||||
ENV SOURCE_MAP_VERSION=0.7.4 \
|
||||
APP_NAME=chalice \
|
||||
LISTEN_PORT=8000 \
|
||||
ENTERPRISE_BUILD=${envarg}
|
||||
|
||||
ADD https://unpkg.com/source-map@${SOURCE_MAP_VERSION}/lib/mappings.wasm /mappings.wasm
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ ARG envarg
|
|||
ENV APP_NAME=alerts \
|
||||
pg_minconn=1 \
|
||||
pg_maxconn=10 \
|
||||
LISTEN_PORT=8000 \
|
||||
ENTERPRISE_BUILD=${envarg}
|
||||
|
||||
COPY requirements-alerts.txt /work_tmp/requirements.txt
|
||||
|
|
|
|||
|
|
@ -4,4 +4,4 @@ source /tmp/.env.override
|
|||
cd sourcemap-reader
|
||||
nohup npm start &> /tmp/sourcemap-reader.log &
|
||||
cd ..
|
||||
uvicorn app:app --host 0.0.0.0 --reload --proxy-headers
|
||||
uvicorn app:app --host 0.0.0.0 --port $LISTEN_PORT --reload --proxy-headers
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
sh env_vars.sh
|
||||
source /tmp/.env.override
|
||||
uvicorn app:app --host 0.0.0.0 --reload
|
||||
uvicorn app:app --host 0.0.0.0 --port $LISTEN_PORT --reload
|
||||
|
|
|
|||
|
|
@ -13,9 +13,7 @@ S3_KEY=
|
|||
S3_SECRET=
|
||||
SAML2_MD_URL=
|
||||
SITE_URL=
|
||||
alert_ntf=http://127.0.0.1:8000/async/alerts/notifications/%s
|
||||
announcement_url=
|
||||
assign_link=http://127.0.0.1:8000/async/email_assignment
|
||||
async_Token=
|
||||
captcha_key=
|
||||
captcha_server=
|
||||
|
|
@ -37,8 +35,9 @@ jwt_algorithm=HS512
|
|||
jwt_exp_delta_seconds=2592000
|
||||
jwt_issuer=openreplay-default-ee
|
||||
jwt_secret="SET A RANDOM STRING HERE"
|
||||
assist=http://assist-openreplay.app.svc.cluster.local:9001/assist/%s/sockets-live
|
||||
assistList=http://assist-openreplay.app.svc.cluster.local:9001/assist/%s/sockets-list
|
||||
ASSIST_URL=http://assist-openreplay.app.svc.cluster.local:9001
|
||||
assist=/assist/%s/sockets-live
|
||||
assistList=/assist/%s/sockets-list
|
||||
pg_dbname=postgres
|
||||
pg_host=postgresql.db.svc.cluster.local
|
||||
pg_password=asayerPostgres
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ RUN apk add --no-cache tini git libc6-compat && ln -s /lib/libc.musl-x86_64.so.1
|
|||
|
||||
ARG envarg
|
||||
ENV ENTERPRISE_BUILD=${envarg} \
|
||||
MAXMINDDB_FILE=/home/openreplay/geoip.mmdb
|
||||
MAXMINDDB_FILE=/home/openreplay/geoip.mmdb \
|
||||
LISTEN_PORT=9001
|
||||
WORKDIR /work
|
||||
COPY package.json .
|
||||
COPY package-lock.json .
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ if (process.env.redis === "true") {
|
|||
}
|
||||
|
||||
const HOST = '0.0.0.0';
|
||||
const PORT = 9001;
|
||||
const PORT = process.env.LISTEN_PORT || 9001;
|
||||
|
||||
let debug = process.env.debug === "1" || false;
|
||||
const PREFIX = process.env.prefix || `/assist`
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ RUN apk add --no-cache tini git libc6-compat && ln -s /lib/libc.musl-x86_64.so.1
|
|||
|
||||
ARG envarg
|
||||
ENV ENTERPRISE_BUILD=${envarg} \
|
||||
MAXMINDDB_FILE=/home/openreplay/geoip.mmdb
|
||||
MAXMINDDB_FILE=/home/openreplay/geoip.mmdb \
|
||||
LISTEN_PORT=9001
|
||||
WORKDIR /work
|
||||
COPY package.json .
|
||||
COPY package-lock.json .
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ const socket = require("./servers/websocket");
|
|||
const {request_logger} = require("./utils/helper");
|
||||
|
||||
const HOST = '0.0.0.0';
|
||||
const PORT = 9001;
|
||||
const PORT = process.env.LISTEN_PORT || 9001;
|
||||
|
||||
const wsapp = express();
|
||||
wsapp.use(express.json());
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue