7 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
13 changed files with 83 additions and 102 deletions
+43 -24
View File
@@ -1,51 +1,70 @@
name: CI/CD Pipeline to Rancher - SIDATA
on:
push:
branches:
- main
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
build-and-deploy:
runs-on: ubuntu-latest
steps:
# ============================================================
# Checkout
# ============================================================
- name: Checkout Code
uses: actions/checkout@v3
# Login ke Registry Gitea Lokal
# ============================================================
# Login Registry
# ============================================================
- name: Log in to Gitea Container Registry
uses: docker/login-action@v2
with:
registry: 10.15.39.187:3000
registry: registry-bpkd.drc-bpkd.data-center.id
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}
# Build & Push Image Aplikasi SIDATA ke Registry
# ============================================================
# Build & Push
# ============================================================
- 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 }}
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 & Update Workload di Cluster Local Rancher BPKD
# ============================================================
# Deploy ke Rancher
# ============================================================
- name: Deploy to Rancher Cluster
shell: bash
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"
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
# 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
echo "kubectl version:"
./kubectl version --client
# 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
echo "=== Configure Rancher Kubeconfig ==="
# Pantau Status Rollout hingga Sukses
./kubectl rollout status deployment/sidata-deployment -n sidataprod
./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 }}"
./
-27
View File
@@ -1,27 +0,0 @@
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
+2 -2
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
@@ -48,7 +48,7 @@ RUN if [ ! -f .env ]; then \
if [ -f .env.example ]; then \
cp .env.example .env; \
else \
echo "APP_NAME=Sidata\nAPP_ENV=production\nAPP_KEY=\nAPP_DEBUG=false\nAPP_URL=https://dashboard-bpkd.drc-bpkd.data-center.id/sidataprod" > .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
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('/sidataprod/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 = '/sidataprod/home';
public const HOME = '/home';
/**
* The controller namespace for the application.
-1
View File
@@ -1 +0,0 @@
gitea debug 09/05/2026 21:15:33
-1
View File
@@ -1 +0,0 @@
hello
-1
View File
@@ -1 +0,0 @@
test gitea small push
Submodule
+1
Submodule gitea-test added at 6b0ee8ee4b
+9 -9
View File
@@ -1,9 +1,9 @@
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: fix-sidata-prefix
namespace: sidata-prod
spec:
stripPrefix:
prefixes:
- /sidataprod
#apiVersion: traefik.io/v1alpha1
#kind: Middleware
#metadata:
# name: fix-sidata-prefix
# namespace: sidata-prod
# spec:
# stripPrefix:
# prefixes:
# - /sidataprod
+3 -3
View File
@@ -21,7 +21,7 @@ ingress:
hosts:
- host: dashboard-bpkd.drc-bpkd.data-center.id
paths:
- path: /sidataprod
- path: /sidata
pathType: Prefix
env:
@@ -29,9 +29,9 @@ env:
APP_ENV: "production"
APP_KEY: "base64:JWoCrp63f8mipgiOWhwpIG+YVpw1Lunn4RZf0mcBWNg="
APP_DEBUG: "false"
APP_URL: "https://dashboard-bpkd.drc-bpkd.data-center.id/sidataprod"
APP_URL: "https://dashboard-bpkd.drc-bpkd.data-center.id/sidata"
# ASSET_URL MEMASTIKAN CSS/JS TETAP MEMILIKI PREFIX /sidata
ASSET_URL: "https://dashboard-bpkd.drc-bpkd.data-center.id/sidataprod"
ASSET_URL: "https://dashboard-bpkd.drc-bpkd.data-center.id/sidata"
LOG_CHANNEL: "stack"
LOG_LEVEL: "debug"
MYSQL_CONNECTION: "mysql"