Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 59 additions & 11 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
APP_NAME=Laravel
# ==============================================
# SIAKAD - Sistem Informasi Akademik
# Production Ready Environment Configuration
# ==============================================

APP_NAME=SIAKAD
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost

APP_LOCALE=en
APP_LOCALE=id
APP_FALLBACK_LOCALE=en
APP_FAKER_LOCALE=en_US
APP_FAKER_LOCALE=id_ID

APP_MAINTENANCE_DRIVER=file
# APP_MAINTENANCE_STORE=database
Expand All @@ -15,51 +20,94 @@ APP_MAINTENANCE_DRIVER=file

BCRYPT_ROUNDS=12

LOG_CHANNEL=stack
# ==============================================
# LOGGING - Use 'daily' for production
# ==============================================
LOG_CHANNEL=daily
LOG_STACK=single
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

# ==============================================
# DATABASE
# For production, use MySQL or PostgreSQL
# ==============================================

# SQLite (Development)
DB_CONNECTION=sqlite

# MySQL (Production - uncomment and configure)
# DB_CONNECTION=mysql
# DB_HOST=127.0.0.1
# DB_PORT=3306
# DB_DATABASE=laravel
# DB_DATABASE=siakad
# DB_USERNAME=root
# DB_PASSWORD=

# PostgreSQL (Production Alternative)
# DB_CONNECTION=pgsql
# DB_HOST=127.0.0.1
# DB_PORT=5432
# DB_DATABASE=siakad
# DB_USERNAME=postgres
# DB_PASSWORD=

# ==============================================
# SESSION & CACHE
# ==============================================
SESSION_DRIVER=database
SESSION_LIFETIME=120
SESSION_ENCRYPT=false
SESSION_PATH=/
SESSION_DOMAIN=null

CACHE_STORE=database
# For production with Redis:
# CACHE_STORE=redis

# ==============================================
# QUEUE & BROADCASTING
# ==============================================
BROADCAST_CONNECTION=log
FILESYSTEM_DISK=local
QUEUE_CONNECTION=database

CACHE_STORE=database
# CACHE_PREFIX=

MEMCACHED_HOST=127.0.0.1

# ==============================================
# REDIS (Optional - for production caching)
# ==============================================
REDIS_CLIENT=phpredis
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

# ==============================================
# MAIL
# ==============================================
MAIL_MAILER=log
MAIL_SCHEME=null
MAIL_HOST=127.0.0.1
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_FROM_ADDRESS="hello@example.com"
MAIL_FROM_ADDRESS="noreply@siakad.example.com"
MAIL_FROM_NAME="${APP_NAME}"

# ==============================================
# AWS (Optional)
# ==============================================
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false

# ==============================================
# VITE
# ==============================================
VITE_APP_NAME="${APP_NAME}"

# ==============================================
# AI - Gemini API
# Get your API key at: https://aistudio.google.com/
# ==============================================
GEMINI_API_KEY=
82 changes: 82 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: SIAKAD CI

on:
push:
branches: [main, master, develop]
pull_request:
branches: [main, master]

jobs:
tests:
runs-on: ubuntu-latest

services:
mysql:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: siakad_test
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

steps:
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.2"
extensions: mbstring, pdo, pdo_mysql, bcmath
coverage: xdebug

- name: Get Composer Cache Directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install Dependencies
run: composer install --no-ansi --no-interaction --no-scripts --prefer-dist

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"

- name: Install NPM Dependencies
run: npm ci

- name: Build Assets
run: npm run build

- name: Copy Environment File
run: cp .env.example .env

- name: Configure Environment
run: |
sed -i 's/DB_CONNECTION=sqlite/DB_CONNECTION=mysql/' .env
sed -i 's/# DB_HOST=127.0.0.1/DB_HOST=127.0.0.1/' .env
sed -i 's/# DB_PORT=3306/DB_PORT=3306/' .env
sed -i 's/# DB_DATABASE=siakad/DB_DATABASE=siakad_test/' .env
sed -i 's/# DB_USERNAME=root/DB_USERNAME=root/' .env
sed -i 's/# DB_PASSWORD=/DB_PASSWORD=password/' .env

- name: Generate Application Key
run: php artisan key:generate

- name: Run Migrations
run: php artisan migrate --force

- name: Run Tests
run: php artisan test --parallel

- name: Generate Test Coverage Report
run: php artisan test --coverage --min=20
continue-on-error: true
Loading
Loading