CI envrionment handling

This commit is contained in:
Olusesan Ameye
2025-08-27 04:44:52 +00:00
parent 1f950d6793
commit 2d6a37297e
9 changed files with 30 additions and 12 deletions
+5 -1
View File
@@ -8,4 +8,8 @@
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
# pass system env CI_ENVIRONMENT to Apache
PassEnv CI_ENVIRONMENT
</VirtualHost>
+14 -6
View File
@@ -1,31 +1,39 @@
# Use an official PHP runtime as a base image
FROM php:8.1-apache
# Build args
ARG CI_ENVIRONMENT
ENV CI_ENVIRONMENT=$CI_ENVIRONMENT
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf
#RUN apt-get update
#RUN apt-get update && apt-get install --yes --force-yes libc-client-dev libkrb5-dev
RUN apt-get update && apt-cache search libc-client
RUN apt-get update && \
apt-get install --yes --force-yes \
cron g++ gettext libicu-dev openssl \
libc-client-dev libkrb5-dev \
libkrb5-dev \
libxml2-dev libfreetype6-dev \
libgd-dev libmcrypt-dev bzip2 \
libbz2-dev libtidy-dev libcurl4-openssl-dev \
libz-dev libmemcached-dev libxslt-dev git-core libpq-dev \
libzip4 libzip-dev libwebp-dev
libzip5 libzip-dev libwebp-dev
# libc-client-dev => libc-client2007e-dev
# PHP Configuration
RUN docker-php-ext-install bcmath bz2 calendar dba exif gettext iconv intl soap tidy xsl zip&&\
docker-php-ext-install mysqli pgsql pdo pdo_mysql pdo_pgsql &&\
docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp &&\
docker-php-ext-install gd &&\
docker-php-ext-configure imap --with-kerberos --with-imap-ssl &&\
docker-php-ext-install imap &&\
docker-php-ext-configure hash --with-mhash &&\
pecl install xdebug && docker-php-ext-enable xdebug &&\
pecl install mongodb && docker-php-ext-enable mongodb &&\
pecl install redis && docker-php-ext-enable redis
# docker-php-ext-configure imap --with-kerberos --with-imap-ssl &&\
# docker-php-ext-install imap &&\
# 2. set up document root for apache
COPY docker/apache/000-default.conf /etc/apache2/sites-available/000-default.conf
@@ -56,4 +64,4 @@ RUN mkdir -p /var/www/html/ANSIBLE && \
RUN composer install
EXPOSE 80
EXPOSE 80