DO NOT PR THIS BRANCHgit add .!; DONE: add docker config for development

This commit is contained in:
ISMAIL MASSERAN
2026-04-22 12:44:16 +08:00
committed by ISMAIL MASSERAN
parent 51860cea37
commit e989f053c4
7 changed files with 235 additions and 22 deletions
+66
View File
@@ -0,0 +1,66 @@
APP_NAME=Lumen
APP_ENV=local
APP_KEY=WbPGkYNmXZ6ZQplGlvl0iZ7zyW1b09xa
APP_DEBUG=true
APP_URL=http://localhost
APP_TIMEZONE=Asia/Kuala_Lumpur
LOG_CHANNEL=stack
LOG_LEVEL=debug
LOG_SLACK_WEBHOOK_URL=
DB_CONNECTION=mysql
DB_HOST=mysql
DB_PORT=3306
DB_DATABASE=erahn_xtra
DB_USERNAME=root
DB_PASSWORD=root
DB_CONNECTION_7=mysql
DB_HOST_7=mysql
DB_PORT_7=3306
DB_DATABASE_7=master_erahn
DB_USERNAME_7=root
DB_PASSWORD_7=root
# DB_CONNECTION_3=mysql
# DB_HOST_3=127.0.0.1
# DB_PORT_3=3306
# DB_DATABASE_3=erahn_baling
# DB_USERNAME_3=root
# DB_PASSWORD_3=root
# DB_CONNECTION_4=mysql
# DB_HOST_4=127.0.0.1
# DB_PORT_4=3306
# DB_DATABASE_4=arrahn_ld
# DB_USERNAME_4=root
# DB_PASSWORD_4=root
# DB_CONNECTION_5=mysql
# DB_HOST_5=127.0.0.1
# DB_PORT_5=3306
# DB_DATABASE_5=erahn_segamat
# DB_USERNAME_5=root
# DB_PASSWORD_5=root
# DB_CONNECTION_6=mysql
# DB_HOST_6=127.0.0.1
# DB_PORT_6=3306
# DB_DATABASE_6=arrahn_kb2
# DB_USERNAME_6=spider
# DB_PASSWORD_6=G0dz!ll42020
# DB_CONNECTION_8=mysql
# DB_HOST_8=127.0.0.1
# DB_PORT_8=3306
# DB_DATABASE_8=arrahn_klanas
# DB_USERNAME_8=spider
# DB_PASSWORD_8=G0dz!ll42020
TENNANT_MASTER_DB=master_erahn
TENNANT_KAUNTER_DB=kaunter_erahn
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
+1 -1
View File
@@ -5,6 +5,6 @@ Homestead.yaml
.env
.phpunit.result.cache
ray.php
docker-compose.yml
/docker_src
/.vscode
**/.DS_Store
+16
View File
@@ -1 +1,17 @@
You know what is this when you in this project
If you does't know what is this you probably in wrong project
```sql
--- for all ip
CREATE USER 'master_erahn'@'%' IDENTIFIED BY 'password';
--- for specific ip
CREATE USER 'kaunter_erahn'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON kaunter_erahn.* TO 'kaunter_erahn'@'%';
FLUSH PRIVILEGES;
```
Gadai=Pembiayaan
Tebus=penyelesaian penuh/ansuran
+28
View File
@@ -23,6 +23,33 @@ $app = new Laravel\Lumen\Application(
dirname(__DIR__)
);
/*
| Laravel's storage_path() helper resolves app('path.storage'). Lumen does not
| register that binding by default; config files that call storage_path() at
| load time (e.g. config/logging.php) would fail without this.
*/
$app->instance('path.storage', $app->storagePath());
/*
| Laravel's Foundation helpers are loaded before Lumen's and win for names like
| response() and url(). Those helpers resolve Illuminate\Contracts\* from the
| container; Lumen only registers the "url" service, not the contracts. Map the
| contracts to Lumen's implementations so helpers work across the app.
*/
$app->singleton(
\Illuminate\Contracts\Routing\ResponseFactory::class,
function () {
return new \Laravel\Lumen\Http\ResponseFactory();
}
);
$app->singleton(
\Illuminate\Contracts\Routing\UrlGenerator::class,
function ($app) {
return $app->make('url');
}
);
$app->withFacades();
$app->withEloquent();
@@ -60,6 +87,7 @@ $app->singleton(
*/
$app->configure('app');
$app->configure('logging');
$app->configure('tinker');
$app->configure('tennant_database');
$app->configure('report');
+1 -1
View File
@@ -1,7 +1,7 @@
<?php
return [
'url' => env('APP_URL', url('/')),
'url' => env('APP_URL', 'http://localhost'),
'api_arrahnbid' => env('API_ARRAHNBID', 'http://lelong.test/api/'),
'api_v3' => env('API_V3', 'http://apiv3.localhost/api/')
];
+103
View File
@@ -0,0 +1,103 @@
<?php
use Monolog\Handler\NullHandler;
use Monolog\Handler\StreamHandler;
use Monolog\Handler\SyslogUdpHandler;
return [
/*
|--------------------------------------------------------------------------
| Default Log Channel
|--------------------------------------------------------------------------
|
| This option defines the default log channel that gets used when writing
| messages to the logs. The name specified in this option should match
| one of the channels defined in the "channels" configuration array.
|
*/
'default' => env('LOG_CHANNEL', 'stack'),
/*
|--------------------------------------------------------------------------
| Log Channels
|--------------------------------------------------------------------------
|
| Here you may configure the log channels for your application. Out of
| the box, Laravel uses the Monolog PHP logging library. This gives
| you a variety of powerful log handlers / formatters to utilize.
|
| Available Drivers: "single", "daily", "slack", "syslog",
| "errorlog", "monolog", "custom", "stack"
|
*/
'channels' => [
'stack' => [
'driver' => 'stack',
'channels' => ['single'],
'ignore_exceptions' => false,
],
'single' => [
'driver' => 'single',
'path' => storage_path('logs/laravel.log'),
'level' => env('LOG_LEVEL', 'debug'),
],
'daily' => [
'driver' => 'daily',
'path' => storage_path('logs/laravel.log'),
'level' => env('LOG_LEVEL', 'debug'),
'days' => 14,
],
'slack' => [
'driver' => 'slack',
'url' => env('LOG_SLACK_WEBHOOK_URL'),
'username' => 'Laravel Log',
'emoji' => ':boom:',
'level' => env('LOG_LEVEL', 'critical'),
],
'papertrail' => [
'driver' => 'monolog',
'level' => env('LOG_LEVEL', 'debug'),
'handler' => SyslogUdpHandler::class,
'handler_with' => [
'host' => env('PAPERTRAIL_URL'),
'port' => env('PAPERTRAIL_PORT'),
],
],
'stderr' => [
'driver' => 'monolog',
'handler' => StreamHandler::class,
'formatter' => env('LOG_STDERR_FORMATTER'),
'with' => [
'stream' => 'php://stderr',
],
],
'syslog' => [
'driver' => 'syslog',
'level' => env('LOG_LEVEL', 'debug'),
],
'errorlog' => [
'driver' => 'errorlog',
'level' => env('LOG_LEVEL', 'debug'),
],
'null' => [
'driver' => 'monolog',
'handler' => NullHandler::class,
],
'emergency' => [
'path' => storage_path('logs/laravel.log'),
],
],
];
+20 -20
View File
@@ -4,22 +4,22 @@ WORKDIR /var/www/html
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
git \
pkg-config \
unzip \
libonig-dev \
libzip-dev \
libpng-dev \
libjpeg62-turbo-dev \
libfreetype6-dev \
git \
pkg-config \
unzip \
libonig-dev \
libzip-dev \
libpng-dev \
libjpeg62-turbo-dev \
libfreetype6-dev \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j"$(nproc)" \
pdo_mysql \
mbstring \
bcmath \
zip \
exif \
gd \
pdo_mysql \
mbstring \
bcmath \
zip \
exif \
gd \
&& rm -rf /var/lib/apt/lists/*
COPY --from=composer:2 /usr/bin/composer /usr/local/bin/composer
@@ -40,12 +40,12 @@ COPY --chown=www-data:www-data . /var/www/html
RUN composer install --no-interaction --prefer-dist --no-dev --optimize-autoloader \
&& mkdir -p \
storage/logs \
storage/framework/cache/data \
storage/framework/views \
storage/framework/sessions \
storage/app/public \
bootstrap/cache \
storage/logs \
storage/framework/cache/data \
storage/framework/views \
storage/framework/sessions \
storage/app/public \
bootstrap/cache \
&& chown -R www-data:www-data storage bootstrap/cache vendor
FROM base AS development