13 Commits
Author SHA1 Message Date
gitea 341faec48b ci: trigger build 2026-09-06 16:13:12 +07:00
gitea 077c9a6253 test: trigger action
CI/CD Pipeline to Rancher - SIDATA / build-and-deploy (push) Failing after 3m14s
2026-09-06 15:57:45 +07:00
gitea 811f9ee741 Fix registry and deployment configuration
CI/CD Pipeline to Rancher - SIDATA / build-and-deploy (push) Failing after 3m13s
2026-09-06 14:26:18 +07:00
gitea 04d48abc85 use HTTPS registry via NPM
CI/CD Pipeline to Rancher - SIDATA / build-and-deploy (push) Failing after 2m44s
2026-09-06 13:22:51 +07:00
gitea e7932a2239 ci: use nexus runner image
CI/CD Pipeline to Rancher - SIDATA / build-and-deploy (push) Failing after 5m18s
2026-09-06 12:46:20 +07:00
gitea 018ec9a694 ci: sesuaikan pipeline deploy sidata-prod
CI/CD Pipeline to Rancher - SIDATA / build-and-deploy (push) Failing after 2m3s
2026-09-06 12:22:43 +07:00
gitea 674941939c fix: support sidataprod path behind traefik
CI/CD Pipeline to Rancher - SIDATA / build-and-deploy (push) Failing after 2m3s
2026-09-06 12:02:09 +07:00
gitea 2e4315dc68 first commit
CI/CD Pipeline to Rancher - SIDATA / build-and-deploy (push) Failing after 2m4s
2026-09-05 20:04:37 +07:00
gitea 17604e5f80 chore: purge ignored files from repository tracking 2026-09-05 19:14:53 +07:00
gitea b924b0ea8e feat: initial commit project sidata 2026-09-05 01:34:37 +07:00
gitea f62fd389b7 fix: set ingress class to traefik and apply middleware 2026-09-04 10:42:39 +07:00
gitea 28c13399f4 fix: revert ingress yaml structure to match helm template 2026-09-04 10:14:19 +07:00
gitea 97bd62fd47 fix: standardize pod nginx to root and enable ingress rewrite-target 2026-09-04 09:10:51 +07:00
32 changed files with 184 additions and 111 deletions
+70
View File
@@ -0,0 +1,70 @@
name: CI/CD Pipeline to Rancher - SIDATA
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
# ============================================================
# Checkout
# ============================================================
- name: Checkout Code
uses: actions/checkout@v3
# ============================================================
# Login Registry
# ============================================================
- name: Log in to Gitea Container Registry
uses: docker/login-action@v2
with:
registry: registry-bpkd.drc-bpkd.data-center.id
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}
# ============================================================
# Build & Push
# ============================================================
- name: Build and Push Docker Image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: |
registry-bpkd.drc-bpkd.data-center.id/${{ secrets.REGISTRY_USER }}/sidata:latest
registry-bpkd.drc-bpkd.data-center.id/${{ secrets.REGISTRY_USER }}/sidata:${{ gitea.sha }}
# ============================================================
# Deploy ke Rancher
# ============================================================
- name: Deploy to Rancher Cluster
shell: bash
run: |
set -e
echo "=== Download kubectl ==="
KUBECTL_VERSION=$(curl -L -s https://dl.k8s.io/release/stable.txt)
curl -fLO \
"https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl"
chmod +x kubectl
echo "kubectl version:"
./kubectl version --client
echo "=== Configure Rancher Kubeconfig ==="
./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 }}"
./
+16
View File
@@ -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
+4 -11
View File
@@ -1,4 +1,4 @@
FROM 10.15.39.186:8083/php74-fpm-oci8-lengkap:1.0
FROM registry-nexus-bpkd.drc-bpkd.data-center.id/php74-fpm-oci8-lengkap:1.0
ARG http_proxy
ARG https_proxy
@@ -57,16 +57,12 @@ RUN chown -R www-data:www-data /var/www/html \
&& chmod -R 775 /var/www/html/storage \
&& 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 { \
listen 80; \
index index.php index.html; \
root /var/www/html/public; \
\
location /sidata { \
try_files $uri $uri/ /sidata/index.php?$query_string; \
} \
\
location / { \
try_files $uri $uri/ /index.php?$query_string; \
} \
@@ -75,14 +71,11 @@ RUN echo 'server { \
fastcgi_pass 127.0.0.1:9000; \
fastcgi_index index.php; \
include fastcgi_params; \
fastcgi_param SCRIPT_FILENAME /var/www/html/public/index.php; \
fastcgi_param SCRIPT_NAME $fastcgi_script_name; \
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; \
} \
}' > /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
# Script startup: Buat .env dari variabel environment Helm, 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;'"]
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -16,7 +16,7 @@ class Authenticate extends Middleware
{
if (! $request->expectsJson()) {
// Paksa redirect membawa prefix /sidata agar tidak terlempar ke root domain
return url('/sidata/login');
return redirect()->guest(route('login'));
}
}
}
+4 -13
View File
@@ -2,22 +2,13 @@
namespace App\Http\Middleware;
use Illuminate\Http\Middleware\TrustProxies as Middleware;
use Illuminate\Http\Request;
use Fideloper\Proxy\TrustProxies as Middleware;
class TrustProxies extends Middleware
{
/**
* The trusted proxies for this application.
*
* @var array|string|null
*/
protected $proxies = '*';
/**
* The headers that should be used to detect proxies.
*
* @var int
*/
protected $headers = Request::HEADER_X_FORWARDED_ALL;
protected $headers = [
\Illuminate\Http\Request::HEADER_X_FORWARDED_ALL,
];
}
+1 -1
View File
@@ -17,7 +17,7 @@ class RouteServiceProvider extends ServiceProvider
*
* @var string
*/
public const HOME = '/sidata/home';
public const HOME = '/home';
/**
* The controller namespace for the application.
Submodule
+1
Submodule gitea-test added at 6b0ee8ee4b
+1 -1
View File
@@ -6,4 +6,4 @@
# spec:
# stripPrefix:
# prefixes:
# - /sidata
# - /sidataprod
+8 -6
View File
@@ -13,13 +13,15 @@ service:
ingress:
enabled: true
className: nginx
className: traefik
annotations:
# HAPUS rewrite-target agar URL /sidata diteruskan utuh ke Pod
# Nginx di dalam Pod kita sudah punya 'location /sidata'
nginx.ingress.kubernetes.io/ssl-redirect: "false"
host: dashboard-bpkd.drc-bpkd.data-center.id
path: /sidata
traefik.ingress.kubernetes.io/router.middlewares: sidata-prod-fix-sidata-prefix@kubernetescrd
traefik.ingress.kubernetes.io/service.sticky.cookie: "true"
traefik.ingress.kubernetes.io/service.sticky.cookie.name: SIDATA_STICKY
hosts:
- host: dashboard-bpkd.drc-bpkd.data-center.id
paths:
- path: /sidata
pathType: Prefix
env:
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
View File
View File
View File
View File
View File
Executable → Regular
View File