diff --git a/api/Dockerfile b/api/Dockerfile index 0ca8c1edf..84d1b88f5 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -4,6 +4,14 @@ WORKDIR /work COPY . . RUN pip install -r requirements.txt -t ./vendor --upgrade RUN pip install chalice==1.22.2 +# 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 sourcemaps_reader && \ + npm install # Add Tini # Startup daemon @@ -13,4 +21,4 @@ ENV ENTERPRISE_BUILD ${envarg} ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini RUN chmod +x /tini ENTRYPOINT ["/tini", "--"] -CMD python env_handler.py && chalice local --no-autoreload --host 0.0.0.0 --stage ${ENTERPRISE_BUILD} \ No newline at end of file +CMD ./entrypoint.sh diff --git a/api/entrypoint.sh b/api/entrypoint.sh new file mode 100755 index 000000000..3c3d12fd5 --- /dev/null +++ b/api/entrypoint.sh @@ -0,0 +1,6 @@ +#!/bin/bash +cd sourcemaps_reader +nohup node server.js &> /tmp/sourcemaps_reader.log & +cd .. +python env_handler.py +chalice local --no-autoreload --host 0.0.0.0 --stage ${ENTERPRISE_BUILD}