From 7d7b70b61d0b727418773ed70b1872b6e35bd695 Mon Sep 17 00:00:00 2001 From: WickedYoda <68271168+wickedyoda@users.noreply.github.com> Date: Mon, 16 Sep 2024 14:46:09 -0500 Subject: [PATCH 1/6] Update Dockerfile Updated docker file to add two depencies to the apk install. --- Dockerfile | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/Dockerfile b/Dockerfile index 895c1034..96e255c5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,3 @@ -# Build Vue.js frontend -FROM node:20-alpine as build-stage - -ARG VUE_APP_VERSION -ENV VUE_APP_VERSION=${VUE_APP_VERSION} - -WORKDIR /app -COPY ./frontend/package*.json ./ -RUN npm install --verbose -COPY ./frontend/ ./ -RUN npm run build --verbose - # Setup Container and install Flask backend FROM python:3.11-alpine as deploy-stage @@ -37,7 +25,9 @@ RUN apk add --no-cache \ python3-dev \ ruby-dev \ nginx \ - curl + curl \ + libxml2-dev \ # Additional dependencies + libxslt-dev # Additional dependencies # Install Docker Compose 2.x as a standalone binary RUN curl -L "https://github.com/docker/compose/releases/download/v2.20.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && \ From 7f591cacfc8db8620c87ba09d91d1d48e4013ebe Mon Sep 17 00:00:00 2001 From: WickedYoda <68271168+wickedyoda@users.noreply.github.com> Date: Mon, 16 Sep 2024 14:51:07 -0500 Subject: [PATCH 2/6] Update Dockerfile --- Dockerfile | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/Dockerfile b/Dockerfile index 96e255c5..d24d972b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,15 @@ +# Build Vue.js frontend +FROM node:20-alpine as build-stage + +ARG VUE_APP_VERSION +ENV VUE_APP_VERSION=${VUE_APP_VERSION} + +WORKDIR /app +COPY ./frontend/package*.json ./ +RUN npm install --verbose +COPY ./frontend/ ./ +RUN npm run build --verbose + # Setup Container and install Flask backend FROM python:3.11-alpine as deploy-stage @@ -26,29 +38,12 @@ RUN apk add --no-cache \ ruby-dev \ nginx \ curl \ - libxml2-dev \ # Additional dependencies - libxslt-dev # Additional dependencies + libxml2-dev \ # Correct placement inside apk add + libxslt-dev # Correct placement inside apk add # Install Docker Compose 2.x as a standalone binary RUN curl -L "https://github.com/docker/compose/releases/download/v2.20.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && \ chmod +x /usr/local/bin/docker-compose # Upgrade pip, setuptools, and wheel -RUN pip3 install --upgrade pip setuptools wheel - -# Install Python packages from requirements.txt -RUN pip3 install -r requirements.txt --no-cache-dir --verbose - -# Install SASS via gem -RUN gem install sass --verbose - -# Clean up build dependencies -RUN apk del --purge build-base && \ - rm -rf /root/.cache /tmp/* - -# Copy the backend code -COPY ./backend/ ./ - -# Expose ports and define the command to run the application -EXPOSE 5000 -CMD ["python3", "app.py"] \ No newline at end of file +RUN​⬤ \ No newline at end of file From 6af515849d6a181279f4569c86c26f83aba523c1 Mon Sep 17 00:00:00 2001 From: WickedYoda <68271168+wickedyoda@users.noreply.github.com> Date: Mon, 16 Sep 2024 14:53:40 -0500 Subject: [PATCH 3/6] Update Dockerfile --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index d24d972b..da6349cd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,8 +38,8 @@ RUN apk add --no-cache \ ruby-dev \ nginx \ curl \ - libxml2-dev \ # Correct placement inside apk add - libxslt-dev # Correct placement inside apk add + libxml2-dev \ + libxslt-dev # Install Docker Compose 2.x as a standalone binary RUN curl -L "https://github.com/docker/compose/releases/download/v2.20.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && \ From 832e43d9f1010e9b99904ef39b0d02609df740c7 Mon Sep 17 00:00:00 2001 From: WickedYoda <68271168+wickedyoda@users.noreply.github.com> Date: Mon, 16 Sep 2024 14:59:02 -0500 Subject: [PATCH 4/6] Update Dockerfile --- Dockerfile | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index da6349cd..01cb8de8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,7 +38,7 @@ RUN apk add --no-cache \ ruby-dev \ nginx \ curl \ - libxml2-dev \ + libxml2-dev \ libxslt-dev # Install Docker Compose 2.x as a standalone binary @@ -46,4 +46,21 @@ RUN curl -L "https://github.com/docker/compose/releases/download/v2.20.0/docker- chmod +x /usr/local/bin/docker-compose # Upgrade pip, setuptools, and wheel -RUN​⬤ \ No newline at end of file +RUN pip3 install --upgrade pip setuptools wheel + +# Install Python packages from requirements.txt +RUN pip3 install -r requirements.txt --no-cache-dir --verbose + +# Install SASS via gem +RUN gem install sass --verbose + +# Clean up build dependencies +RUN apk del --purge build-base && \ + rm -rf /root/.cache /tmp/* + +# Copy the backend code +COPY ./backend/ ./ + +# Expose ports and define the command to run the application +EXPOSE 5000 +CMD ["python3", "app.py"] \ No newline at end of file From f3e2b9de2ec470549662c63288b5ab186c4d5fb6 Mon Sep 17 00:00:00 2001 From: WickedYoda <68271168+wickedyoda@users.noreply.github.com> Date: Mon, 16 Sep 2024 15:47:29 -0500 Subject: [PATCH 5/6] Updated dockerbuild From cdb35c89251761b8eb31032c51bcc7de1fe169e8 Mon Sep 17 00:00:00 2001 From: SelfhostedPro Date: Thu, 3 Oct 2024 10:48:03 -0700 Subject: [PATCH 6/6] Update Dockerfile to install rust as dep --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 01cb8de8..1ac6e797 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,6 +38,8 @@ RUN apk add --no-cache \ ruby-dev \ nginx \ curl \ + rust \ + cargo \ libxml2-dev \ libxslt-dev @@ -63,4 +65,4 @@ COPY ./backend/ ./ # Expose ports and define the command to run the application EXPOSE 5000 -CMD ["python3", "app.py"] \ No newline at end of file +CMD ["python3", "app.py"]