Compare commits
10
Commits
f06a8fc205
...
96619ca480
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
96619ca480 | ||
|
|
b9f3ce7bb8 | ||
|
|
8d809109de | ||
|
|
39184a8a52 | ||
|
|
2e4315dc68 | ||
|
|
17604e5f80 | ||
|
|
b924b0ea8e | ||
|
|
f62fd389b7 | ||
|
|
28c13399f4 | ||
|
|
97bd62fd47 |
@@ -0,0 +1,51 @@
|
|||||||
|
name: CI/CD Pipeline to Rancher - SIDATA
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout Code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
# Login ke Registry Gitea Lokal
|
||||||
|
- name: Log in to Gitea Container Registry
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: 10.15.39.187:3000
|
||||||
|
username: ${{ secrets.REGISTRY_USER }}
|
||||||
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||||
|
|
||||||
|
# Build & Push Image Aplikasi SIDATA ke Registry
|
||||||
|
- name: Build and Push Docker Image
|
||||||
|
uses: docker/build-push-action@v4
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
10.15.39.187:3000/${{ secrets.REGISTRY_USER }}/sidata:latest
|
||||||
|
10.15.39.187:3000/${{ secrets.REGISTRY_USER }}/sidata:${{ gitea.sha }}
|
||||||
|
|
||||||
|
# Deploy & Update Workload di Cluster Local Rancher BPKD
|
||||||
|
- name: Deploy to Rancher Cluster
|
||||||
|
run: |
|
||||||
|
# Download binary kubectl
|
||||||
|
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
|
||||||
|
chmod +x kubectl
|
||||||
|
|
||||||
|
# Set Kubeconfig menggunakan API Rancher BPKD
|
||||||
|
./kubectl config set-cluster rancher-cluster --server=${{ secrets.RANCHER_URL }}/k8s/clusters/${{ secrets.RANCHER_CLUSTER_ID }} --insecure-skip-tls-verify=true
|
||||||
|
./kubectl config set-credentials rancher-user --token=${{ secrets.RANCHER_TOKEN }}
|
||||||
|
./kubectl config set-context rancher-context --cluster=rancher-cluster --user=rancher-user
|
||||||
|
./kubectl config use-context rancher-context
|
||||||
|
|
||||||
|
# Update Container Image untuk Workload sidata
|
||||||
|
# Sesuaikan 'sidata-deployment', 'sidata-container', dan namespace jika berbeda di Rancher
|
||||||
|
./kubectl set image deployment/sidata-deployment sidata-container=10.15.39.187:3000/${{ secrets.REGISTRY_USER }}/sidata:${{ gitea.sha }} -n sidataprod
|
||||||
|
|
||||||
|
# Pantau Status Rollout hingga Sukses
|
||||||
|
./kubectl rollout status deployment/sidata-deployment -n sidataprod
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
name: Docker Test
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
docker-test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Check Docker
|
||||||
|
run: |
|
||||||
|
docker version
|
||||||
|
docker info
|
||||||
|
|
||||||
|
- name: Test Docker Build
|
||||||
|
run: |
|
||||||
|
mkdir test-image
|
||||||
|
cd test-image
|
||||||
|
|
||||||
|
cat > Dockerfile <<'EOF'
|
||||||
|
FROM alpine:latest
|
||||||
|
CMD ["echo", "Docker runner works!"]
|
||||||
|
EOF
|
||||||
|
|
||||||
|
docker build -t test-runner:latest .
|
||||||
|
docker run --rm test-runner:latest
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
/node_modules
|
||||||
|
/public/hot
|
||||||
|
/public/storage
|
||||||
|
/public/uploadFiles
|
||||||
|
/public/downloadFiles
|
||||||
|
/storage/*.key
|
||||||
|
.env
|
||||||
|
.env.backup
|
||||||
|
.phpunit.result.cache
|
||||||
|
docker-compose.override.yml
|
||||||
|
Homestead.json
|
||||||
|
Homestead.yaml
|
||||||
|
npm-debug.log
|
||||||
|
yarn-error.log
|
||||||
|
/.idea
|
||||||
|
/.vscode
|
||||||
+80
-87
@@ -1,88 +1,81 @@
|
|||||||
FROM 10.15.39.186:8083/php74-fpm-oci8-lengkap:1.0
|
FROM 10.15.39.186:8083/php74-fpm-oci8-lengkap:1.0
|
||||||
|
|
||||||
ARG http_proxy
|
ARG http_proxy
|
||||||
ARG https_proxy
|
ARG https_proxy
|
||||||
|
|
||||||
ENV http_proxy=${http_proxy}
|
ENV http_proxy=${http_proxy}
|
||||||
ENV https_proxy=${https_proxy}
|
ENV https_proxy=${https_proxy}
|
||||||
ENV HTTP_PROXY=${http_proxy}
|
ENV HTTP_PROXY=${http_proxy}
|
||||||
ENV HTTPS_PROXY=${https_proxy}
|
ENV HTTPS_PROXY=${https_proxy}
|
||||||
|
|
||||||
# =========================================================
|
# =========================================================
|
||||||
# System dependencies & Extensions
|
# System dependencies & Extensions
|
||||||
# =========================================================
|
# =========================================================
|
||||||
|
|
||||||
RUN echo "deb [trusted=yes] http://10.15.39.186:8081/repository/debian-proxy/ bullseye main" > /etc/apt/sources.list \
|
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 \
|
&& 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/* \
|
&& rm -rf /etc/apt/sources.list.d/* \
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends \
|
&& apt-get install -y --no-install-recommends \
|
||||||
nginx \
|
nginx \
|
||||||
redis-server \
|
redis-server \
|
||||||
procps \
|
procps \
|
||||||
vim \
|
vim \
|
||||||
wget \
|
wget \
|
||||||
curl \
|
curl \
|
||||||
libpng-dev \
|
libpng-dev \
|
||||||
libjpeg-dev \
|
libjpeg-dev \
|
||||||
libfreetype6-dev \
|
libfreetype6-dev \
|
||||||
libzip-dev \
|
libzip-dev \
|
||||||
libaio1 \
|
libaio1 \
|
||||||
libaio-dev \
|
libaio-dev \
|
||||||
unzip \
|
unzip \
|
||||||
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
|
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
|
||||||
&& docker-php-ext-install gd pdo pdo_mysql zip \
|
&& 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 \
|
&& 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 \
|
&& pecl install redis.tgz \
|
||||||
&& docker-php-ext-enable redis \
|
&& docker-php-ext-enable redis \
|
||||||
&& rm -f redis.tgz \
|
&& rm -f redis.tgz \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
WORKDIR /var/www/html
|
WORKDIR /var/www/html
|
||||||
|
|
||||||
# Salin source code aplikasi
|
# Salin source code aplikasi
|
||||||
COPY . /var/www/html
|
COPY . /var/www/html
|
||||||
|
|
||||||
# Buat file .env dari .env.example jika .env belum ada di repositori
|
# Buat file .env dari .env.example jika .env belum ada di repositori
|
||||||
RUN if [ ! -f .env ]; then \
|
RUN if [ ! -f .env ]; then \
|
||||||
if [ -f .env.example ]; then \
|
if [ -f .env.example ]; then \
|
||||||
cp .env.example .env; \
|
cp .env.example .env; \
|
||||||
else \
|
else \
|
||||||
echo "APP_NAME=Sidata\nAPP_ENV=production\nAPP_KEY=\nAPP_DEBUG=true\nAPP_URL=https://dashboard-bpkd.drc-bpkd.data-center.id/sidata" > .env; \
|
echo "APP_NAME=Sidata\nAPP_ENV=production\nAPP_KEY=\nAPP_DEBUG=true\nAPP_URL=https://dashboard-bpkd.drc-bpkd.data-center.id/sidata" > .env; \
|
||||||
fi \
|
fi \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Atur hak akses folder web, storage, dan cache Laravel
|
# Atur hak akses folder web, storage, dan cache Laravel
|
||||||
RUN chown -R www-data:www-data /var/www/html \
|
RUN chown -R www-data:www-data /var/www/html \
|
||||||
&& chmod -R 775 /var/www/html/storage \
|
&& chmod -R 775 /var/www/html/storage \
|
||||||
&& chmod -R 775 /var/www/html/bootstrap/cache
|
&& chmod -R 775 /var/www/html/bootstrap/cache
|
||||||
|
|
||||||
# Konfigurasi Nginx presisi untuk subpath /sidata dan PHP-FPM
|
# Konfigurasi Nginx Standar Laravel (Merespons di Root /)
|
||||||
RUN echo 'server { \
|
RUN echo 'server { \
|
||||||
listen 80; \
|
listen 80; \
|
||||||
index index.php index.html; \
|
index index.php index.html; \
|
||||||
root /var/www/html/public; \
|
root /var/www/html/public; \
|
||||||
\
|
\
|
||||||
location /sidata { \
|
location / { \
|
||||||
try_files $uri $uri/ /sidata/index.php?$query_string; \
|
try_files $uri $uri/ /index.php?$query_string; \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
location / { \
|
location ~ \.php$ { \
|
||||||
try_files $uri $uri/ /index.php?$query_string; \
|
fastcgi_pass 127.0.0.1:9000; \
|
||||||
} \
|
fastcgi_index index.php; \
|
||||||
\
|
include fastcgi_params; \
|
||||||
location ~ \.php$ { \
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; \
|
||||||
fastcgi_pass 127.0.0.1:9000; \
|
} \
|
||||||
fastcgi_index index.php; \
|
}' > /etc/nginx/sites-available/default
|
||||||
include fastcgi_params; \
|
|
||||||
fastcgi_param SCRIPT_FILENAME /var/www/html/public/index.php; \
|
EXPOSE 80
|
||||||
fastcgi_param SCRIPT_NAME $fastcgi_script_name; \
|
|
||||||
} \
|
# Script startup: Buat .env dari variabel environment Helm, lalu jalankan service
|
||||||
}' > /etc/nginx/sites-available/default
|
|
||||||
|
|
||||||
# ... (bagian atas Dockerfile tetap sama) ...
|
|
||||||
|
|
||||||
EXPOSE 80
|
|
||||||
|
|
||||||
# Script startup: Buat .env dari variabel environment Helm jika .env belum ada, lalu jalankan service
|
|
||||||
CMD ["sh", "-c", "env | grep -E '^(APP_|DB_|MYSQL_|ORA_|REDIS_|MAIL_|SESSION_|SOA_)' > /var/www/html/.env && redis-server --daemonize yes && php-fpm -D && exec nginx -g 'daemon off;'"]
|
CMD ["sh", "-c", "env | grep -E '^(APP_|DB_|MYSQL_|ORA_|REDIS_|MAIL_|SESSION_|SOA_)' > /var/www/html/.env && redis-server --daemonize yes && php-fpm -D && exec nginx -g 'daemon off;'"]
|
||||||
@@ -1,64 +1 @@
|
|||||||
<p align="center"><a href="https://laravel.com" target="_blank"><img src="https://raw.githubusercontent.com/laravel/art/master/logo-lockup/5%20SVG/2%20CMYK/1%20Full%20Color/laravel-logolockup-cmyk-red.svg" width="400"></a></p>
|
# SIDATA Project
|
||||||
|
|
||||||
<p align="center">
|
|
||||||
<a href="https://travis-ci.org/laravel/framework"><img src="https://travis-ci.org/laravel/framework.svg" alt="Build Status"></a>
|
|
||||||
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/dt/laravel/framework" alt="Total Downloads"></a>
|
|
||||||
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/v/laravel/framework" alt="Latest Stable Version"></a>
|
|
||||||
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/l/laravel/framework" alt="License"></a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
## About Laravel
|
|
||||||
|
|
||||||
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:
|
|
||||||
|
|
||||||
- [Simple, fast routing engine](https://laravel.com/docs/routing).
|
|
||||||
- [Powerful dependency injection container](https://laravel.com/docs/container).
|
|
||||||
- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage.
|
|
||||||
- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent).
|
|
||||||
- Database agnostic [schema migrations](https://laravel.com/docs/migrations).
|
|
||||||
- [Robust background job processing](https://laravel.com/docs/queues).
|
|
||||||
- [Real-time event broadcasting](https://laravel.com/docs/broadcasting).
|
|
||||||
|
|
||||||
Laravel is accessible, powerful, and provides tools required for large, robust applications.
|
|
||||||
|
|
||||||
## Learning Laravel
|
|
||||||
|
|
||||||
Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.
|
|
||||||
|
|
||||||
If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains over 1500 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.
|
|
||||||
|
|
||||||
## Laravel Sponsors
|
|
||||||
|
|
||||||
We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the Laravel [Patreon page](https://patreon.com/taylorotwell).
|
|
||||||
|
|
||||||
### Premium Partners
|
|
||||||
|
|
||||||
- **[Vehikl](https://vehikl.com/)**
|
|
||||||
- **[Tighten Co.](https://tighten.co)**
|
|
||||||
- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)**
|
|
||||||
- **[64 Robots](https://64robots.com)**
|
|
||||||
- **[Cubet Techno Labs](https://cubettech.com)**
|
|
||||||
- **[Cyber-Duck](https://cyber-duck.co.uk)**
|
|
||||||
- **[Many](https://www.many.co.uk)**
|
|
||||||
- **[Webdock, Fast VPS Hosting](https://www.webdock.io/en)**
|
|
||||||
- **[DevSquad](https://devsquad.com)**
|
|
||||||
- **[Curotec](https://www.curotec.com/services/technologies/laravel/)**
|
|
||||||
- **[OP.GG](https://op.gg)**
|
|
||||||
- **[CMS Max](https://www.cmsmax.com/)**
|
|
||||||
- **[WebReinvent](https://webreinvent.com/?utm_source=laravel&utm_medium=github&utm_campaign=patreon-sponsors)**
|
|
||||||
|
|
||||||
## Contributing
|
|
||||||
|
|
||||||
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).
|
|
||||||
|
|
||||||
## Code of Conduct
|
|
||||||
|
|
||||||
In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct).
|
|
||||||
|
|
||||||
## Security Vulnerabilities
|
|
||||||
|
|
||||||
If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed.
|
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
|
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
gitea debug 09/05/2026 21:15:33
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
hello
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
test gitea small push
|
||||||
@@ -13,14 +13,16 @@ service:
|
|||||||
|
|
||||||
ingress:
|
ingress:
|
||||||
enabled: true
|
enabled: true
|
||||||
className: nginx
|
className: traefik
|
||||||
annotations:
|
annotations:
|
||||||
# HAPUS rewrite-target agar URL /sidata diteruskan utuh ke Pod
|
traefik.ingress.kubernetes.io/router.middlewares: sidata-prod-fix-sidata-prefix@kubernetescrd
|
||||||
# Nginx di dalam Pod kita sudah punya 'location /sidata'
|
traefik.ingress.kubernetes.io/service.sticky.cookie: "true"
|
||||||
nginx.ingress.kubernetes.io/ssl-redirect: "false"
|
traefik.ingress.kubernetes.io/service.sticky.cookie.name: SIDATA_STICKY
|
||||||
host: dashboard-bpkd.drc-bpkd.data-center.id
|
hosts:
|
||||||
path: /sidata
|
- host: dashboard-bpkd.drc-bpkd.data-center.id
|
||||||
pathType: Prefix
|
paths:
|
||||||
|
- path: /sidata
|
||||||
|
pathType: Prefix
|
||||||
|
|
||||||
env:
|
env:
|
||||||
APP_NAME: "SIDATA"
|
APP_NAME: "SIDATA"
|
||||||
|
|||||||
Vendored
Executable → Regular
Vendored
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Reference in New Issue
Block a user