From fb283921122ead8b488d2b72fbebbdd2e0e61651 Mon Sep 17 00:00:00 2001 From: Robin Wood Date: Mon, 3 Feb 2025 10:53:46 +0000 Subject: [PATCH] autobuild the API stuff --- .dockerignore | 2 +- Dockerfile | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.dockerignore b/.dockerignore index 37fb9ffb7..889c463b5 100644 --- a/.dockerignore +++ b/.dockerignore @@ -3,4 +3,4 @@ **/.github **/Dockerfile* **/.dockerignore -**/compose* +**/compose.yml diff --git a/Dockerfile b/Dockerfile index 6b70b1c6c..662ba1f57 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,11 +9,17 @@ WORKDIR /var/www/html # https://www.php.net/manual/en/image.installation.php RUN apt-get update \ && export DEBIAN_FRONTEND=noninteractive \ - && apt-get install -y zlib1g-dev libpng-dev libjpeg-dev libfreetype6-dev iputils-ping \ + && apt-get install -y zlib1g-dev libpng-dev libjpeg-dev libfreetype6-dev iputils-ping git \ && apt-get clean -y && rm -rf /var/lib/apt/lists/* \ && docker-php-ext-configure gd --with-jpeg --with-freetype \ + && a2enmod rewrite \ # Use pdo_sqlite instead of pdo_mysql if you want to use sqlite && docker-php-ext-install gd mysqli pdo pdo_mysql +COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer COPY --chown=www-data:www-data . . COPY --chown=www-data:www-data config/config.inc.php.dist config/config.inc.php + +# This is configuring the stuff for the API +RUN cd /var/www/html/vulnerabilities/api \ + && composer install \