diff --git a/Dockerfile b/Dockerfile index 051692d..119faa0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,24 +1,42 @@ FROM 10.15.39.186:8083/php74-fpm-oci8-lengkap:1.0 -# Arahkan repository APT ke Nexus Debian Proxy lokal -RUN sed -i 's|http://deb.debian.org/debian|http://10.15.39.186:8081/repository/debian-proxy|g' /etc/apt/sources.list \ - && sed -i 's|http://security.debian.org/debian-security|http://10.15.39.186:8081/repository/debian-proxy|g' /etc/apt/sources.list \ - && sed -i 's|http://security.debian.org|http://10.15.39.186:8081/repository/debian-proxy|g' /etc/apt/sources.list 2>/dev/null || true +ARG http_proxy +ARG https_proxy -# Install Nginx dan dependensi kompilasi -RUN apt-get update && apt-get install -y \ - nginx \ - curl \ - autoconf \ - g++ \ - make \ - && rm -rf /var/lib/apt/lists/* +ENV http_proxy=${http_proxy} +ENV https_proxy=${https_proxy} +ENV HTTP_PROXY=${http_proxy} +ENV HTTPS_PROXY=${https_proxy} -# Unduh dan pasang ekstensi PHP Redis dari repository Nexus -RUN curl -o /tmp/redis-5.3.7.tgz http://10.15.39.186:8081/repository/raw-assets/storage/app/uploads/redis-5.3.7.tgz \ - && pecl install /tmp/redis-5.3.7.tgz \ +# ========================================================= +# System dependencies & Extensions +# ========================================================= + +RUN echo "deb [trusted=yes] http://10.15.39.186:8081/repository/debian-proxy/ bullseye main" > /etc/apt/sources.list \ + && echo "deb [trusted=yes] http://10.15.39.186:8081/repository/debian-proxy/ bullseye-updates main" >> /etc/apt/sources.list \ + && rm -rf /etc/apt/sources.list.d/* \ + && apt-get update \ + && apt-get install -y --no-install-recommends \ + nginx \ + redis-server \ + procps \ + vim \ + wget \ + curl \ + libpng-dev \ + libjpeg-dev \ + libfreetype6-dev \ + libzip-dev \ + libaio1 \ + libaio-dev \ + unzip \ + && docker-php-ext-configure gd --with-freetype --with-jpeg \ + && docker-php-ext-install gd pdo pdo_mysql zip \ + && curl --noproxy "*" -fsSL http://10.15.39.186:8081/repository/raw-assets/storage/app/uploads/redis-5.3.7.tgz -o redis.tgz \ + && pecl install redis.tgz \ && docker-php-ext-enable redis \ - && rm -f /tmp/redis-5.3.7.tgz + && rm -f redis.tgz \ + && rm -rf /var/lib/apt/lists/* WORKDIR /var/www/html @@ -47,4 +65,4 @@ RUN echo 'server { \ EXPOSE 80 -CMD ["sh", "-c", "php-fpm -D && nginx -g 'daemon off;'"] \ No newline at end of file +CMD ["sh", "-c", "redis-server --daemonize yes && php-fpm -D && exec nginx -g 'daemon off;'"] \ No newline at end of file diff --git a/helm/sidata/templates/middleware.yaml b/helm/sidata/templates/middleware.yaml index e8d033d..75ab575 100644 --- a/helm/sidata/templates/middleware.yaml +++ b/helm/sidata/templates/middleware.yaml @@ -1,9 +1,9 @@ -apiVersion: traefik.io/v1alpha1 -kind: Middleware -metadata: - name: fix-sidata-prefix - namespace: sidata-prod -spec: - stripPrefix: - prefixes: - - /sidata \ No newline at end of file +#apiVersion: traefik.io/v1alpha1 +#kind: Middleware +#metadata: +# name: fix-sidata-prefix +# namespace: sidata-prod +# spec: +# stripPrefix: +# prefixes: +# - /sidata \ No newline at end of file