Compare commits

11 Commits
Author SHA1 Message Date
gitea eccb3ba750 fix sidataprod base URL and routes 2026-09-06 11:20:19 +07:00
gitea 96619ca480 test small push 2026-09-06 09:57:25 +07:00
gitea b9f3ce7bb8 test docker runner 2026-09-06 09:31:06 +07:00
gitea 8d809109de debug: small ssh push 2026-09-05 21:42:43 +07:00
gitea 39184a8a52 test gitea receive 2026-09-05 21:15:33 +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
34 changed files with 201 additions and 172 deletions
+51
View File
@@ -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
+27
View File
@@ -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
+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
@@ -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=true\nAPP_URL=https://dashboard-bpkd.drc-bpkd.data-center.id/sidata" > .env; \
echo "APP_NAME=Sidata\nAPP_ENV=production\nAPP_KEY=\nAPP_DEBUG=false\nAPP_URL=https://dashboard-bpkd.drc-bpkd.data-center.id/sidataprod" > .env; \
fi \
fi
@@ -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;'"]
+1 -64
View File
@@ -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>
<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).
# SIDATA Project
+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 url('/sidataprod/login');
}
}
}
+1 -1
View File
@@ -17,7 +17,7 @@ class RouteServiceProvider extends ServiceProvider
*
* @var string
*/
public const HOME = '/sidata/home';
public const HOME = '/sidataprod/home';
/**
* The controller namespace for the application.
+1
View File
@@ -0,0 +1 @@
gitea debug 09/05/2026 21:15:33
+1
View File
@@ -0,0 +1 @@
hello
+1
View File
@@ -0,0 +1 @@
test gitea small push
+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:
# - /sidata
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: fix-sidata-prefix
namespace: sidata-prod
spec:
stripPrefix:
prefixes:
- /sidataprod
+11 -9
View File
@@ -13,23 +13,25 @@ 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
pathType: Prefix
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: /sidataprod
pathType: Prefix
env:
APP_NAME: "SIDATA"
APP_ENV: "production"
APP_KEY: "base64:JWoCrp63f8mipgiOWhwpIG+YVpw1Lunn4RZf0mcBWNg="
APP_DEBUG: "false"
APP_URL: "https://dashboard-bpkd.drc-bpkd.data-center.id/sidata"
APP_URL: "https://dashboard-bpkd.drc-bpkd.data-center.id/sidataprod"
# ASSET_URL MEMASTIKAN CSS/JS TETAP MEMILIKI PREFIX /sidata
ASSET_URL: "https://dashboard-bpkd.drc-bpkd.data-center.id/sidata"
ASSET_URL: "https://dashboard-bpkd.drc-bpkd.data-center.id/sidataprod"
LOG_CHANNEL: "stack"
LOG_LEVEL: "debug"
MYSQL_CONNECTION: "mysql"
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