feat(api): merged sourcemaps reader with API build

This commit is contained in:
Taha Yassine Kraiem 2022-04-13 19:16:24 +02:00
parent 364b9c40f2
commit 7308ba2c18
8 changed files with 24 additions and 4 deletions

View file

@ -44,6 +44,6 @@ sentryURL=
sessions_bucket=mobs
sessions_region=us-east-1
sourcemaps_bucket=sourcemaps
sourcemaps_reader=http://utilities-openreplay.app.svc.cluster.local:9000/sourcemaps
sourcemaps_reader=http://127.0.0.1:9000/
stage=default-foss
version_number=1.4.0

View file

@ -6,6 +6,14 @@ COPY . .
RUN pip install -r requirements.txt
RUN mv .env.default .env
ENV APP_NAME chalice
# Installing Nodejs
RUN apt update && apt install -y curl && \
curl -fsSL https://deb.nodesource.com/setup_12.x | bash - && \
apt install -y nodejs && \
apt remove --purge -y curl && \
rm -rf /var/lib/apt/lists/* && \
cd sourcemap-reader && \
npm install
# Add Tini
# Startup daemon

View file

@ -18,6 +18,8 @@ check_prereq() {
}
function build_api(){
cp -R ../utilities/utils ../sourcemap-reader/.
cp -R ../sourcemap-reader .
tag=""
# Copy enterprise code
[[ $1 == "ee" ]] && {

View file

@ -1,2 +1,5 @@
#!/bin/bash
cd sourcemap-reader
nohup npm start &> /tmp/sourcemap-reader.log &
cd ..
uvicorn app:app --host 0.0.0.0 --reload

View file

@ -53,6 +53,6 @@ sentryURL=
sessions_bucket=mobs
sessions_region=us-east-1
sourcemaps_bucket=sourcemaps
sourcemaps_reader=http://utilities-openreplay.app.svc.cluster.local:9000/sourcemaps
sourcemaps_reader=http://127.0.0.1:9000/
stage=default-ee
version_number=1.0.0

1
ee/api/.gitignore vendored
View file

@ -261,3 +261,4 @@ Pipfile
/routers/subs/metrics.py
/routers/subs/v1_api.py
/chalicelib/core/dashboards2.py
entrypoint.sh

View file

@ -7,6 +7,14 @@ COPY . .
RUN pip install -r requirements.txt
RUN mv .env.default .env
ENV APP_NAME chalice
# Installing Nodejs
RUN apt update && apt install -y curl && \
curl -fsSL https://deb.nodesource.com/setup_12.x | bash - && \
apt install -y nodejs && \
apt remove --purge -y curl && \
rm -rf /var/lib/apt/lists/* && \
cd sourcemap-reader && \
npm install
# Add Tini
# Startup daemon

View file

@ -1,2 +0,0 @@
#!/bin/bash
uvicorn app:app --host 0.0.0.0 --reload