ci: setup Dockerfile, GitLab CI pipeline, and Helm chart for Rancher3
This commit is contained in:
+34
-16
@@ -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 \
|
||||
ENV http_proxy=${http_proxy}
|
||||
ENV https_proxy=${https_proxy}
|
||||
ENV HTTP_PROXY=${http_proxy}
|
||||
ENV HTTPS_PROXY=${https_proxy}
|
||||
|
||||
# =========================================================
|
||||
# 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 \
|
||||
autoconf \
|
||||
g++ \
|
||||
make \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# 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 \
|
||||
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;'"]
|
||||
CMD ["sh", "-c", "redis-server --daemonize yes && php-fpm -D && exec nginx -g 'daemon off;'"]
|
||||
@@ -1,9 +1,9 @@
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: fix-sidata-prefix
|
||||
namespace: sidata-prod
|
||||
spec:
|
||||
stripPrefix:
|
||||
prefixes:
|
||||
- /sidata
|
||||
#apiVersion: traefik.io/v1alpha1
|
||||
#kind: Middleware
|
||||
#metadata:
|
||||
# name: fix-sidata-prefix
|
||||
# namespace: sidata-prod
|
||||
# spec:
|
||||
# stripPrefix:
|
||||
# prefixes:
|
||||
# - /sidata
|
||||
Reference in New Issue
Block a user