From 81cfce4a42f071a998a4629247268a3168b4f18b Mon Sep 17 00:00:00 2001 From: drorganvidez Date: Thu, 24 Oct 2024 18:16:25 +0200 Subject: [PATCH] feat: Improve deployment in production and Render --- docker/images/Dockerfile.prod | 9 +++++++++ docker/images/Dockerfile.render | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/docker/images/Dockerfile.prod b/docker/images/Dockerfile.prod index a6be7ce36..378e71ed8 100644 --- a/docker/images/Dockerfile.prod +++ b/docker/images/Dockerfile.prod @@ -10,6 +10,11 @@ RUN apt-get update \ && apt-get install -y --no-install-recommends openrc \ && apt-get install -y --no-install-recommends build-essential +# Install Node.js and NPM +RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \ + && apt-get install -y --no-install-recommends nodejs \ + && npm install -g npm@latest + # Clean up RUN apt-get clean \ && rm -rf /var/lib/apt/lists/* @@ -33,6 +38,9 @@ RUN find . -type d -name "__pycache__" -exec rm -r {} + && \ # Copy the wait-for-db.sh script and set execution permissions COPY --chmod=0755 scripts/wait-for-db.sh ./scripts/ +# Create the .moduleignore file with the module 'webhook' inside +RUN echo "webhook" > /app/.moduleignore + # Update pip RUN pip install --no-cache-dir --upgrade pip @@ -40,6 +48,7 @@ RUN pip install --no-cache-dir --upgrade pip RUN pip install -r requirements.txt # Install Rosemary +COPY setup.py . RUN pip install -e ./ # Install npm dependencies diff --git a/docker/images/Dockerfile.render b/docker/images/Dockerfile.render index 59ea23b4d..a7a794389 100644 --- a/docker/images/Dockerfile.render +++ b/docker/images/Dockerfile.render @@ -10,6 +10,11 @@ RUN apt-get update \ && apt-get install -y --no-install-recommends openrc \ && apt-get install -y --no-install-recommends build-essential +# Install Node.js and NPM +RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \ + && apt-get install -y --no-install-recommends nodejs \ + && npm install -g npm@latest + # Clean up RUN apt-get clean \ && rm -rf /var/lib/apt/lists/*