Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1043412b2a | ||
|
|
18ca2c32ca | ||
|
|
2f6d518e67 | ||
|
|
8d6e853d4c | ||
|
|
6b6572db67 | ||
|
|
b46b24bb83 | ||
|
|
b12fb86c1c | ||
|
|
84dc9d74b9 | ||
|
|
114d0c7cd9 | ||
|
|
bb553924d0 | ||
|
|
73a14e545b | ||
|
|
2756aed449 | ||
|
|
289908f302 | ||
|
|
7b9674110e | ||
|
|
e070c9f374 | ||
|
|
95cf933424 | ||
|
|
2aca0010dc | ||
|
|
4701c3f86d | ||
|
|
fb53fdb16d | ||
|
|
9bee381f6c | ||
|
|
8125895538 |
No files matched your search
@@ -0,0 +1,39 @@
|
||||
APP_NAME="NH Gooi (dev)"
|
||||
APP_ENV=staging
|
||||
APP_KEY=pHU3XfraRBc4T54pe5hM0WsCz1zZxWG3
|
||||
APP_DEBUG=true
|
||||
APP_LOG_LEVEL=error
|
||||
APP_URL=https://dev.nhgooi.nl
|
||||
IMAGE_BASE_URL=https://dev.nhgooi.nl/
|
||||
|
||||
API_URL=https://api-new.nhgooi.nl/
|
||||
|
||||
BROADCAST_DRIVER=log
|
||||
CACHE_DRIVER=file
|
||||
SESSION_DRIVER=file
|
||||
QUEUE_DRIVER=sync
|
||||
|
||||
REDIS_HOST=127.0.0.1
|
||||
REDIS_PASSWORD=null
|
||||
REDIS_PORT=6379
|
||||
|
||||
MAIL_DRIVER=smtp
|
||||
MAIL_HOST=in-v3.mailjet.com
|
||||
MAIL_PORT=25
|
||||
MAIL_USERNAME=08eb4dbf869367bc1478f0777b9de044
|
||||
MAIL_PASSWORD=eb26e4f3e5e6dbeb8aad361c69bf5ff1
|
||||
MAIL_ENCRYPTION=null
|
||||
|
||||
PUSHER_APP_ID=
|
||||
PUSHER_APP_KEY=
|
||||
PUSHER_APP_SECRET=
|
||||
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=nhgooi.nl
|
||||
DB_PORT=3306
|
||||
DB_DATABASE=radio6fm_web
|
||||
DB_USERNAME=6fmstats
|
||||
DB_PASSWORD=C6h938EJ2cd5p4cT
|
||||
|
||||
CACHE_DRIVER=file
|
||||
QUEUE_DRIVER=sync
|
||||
@@ -10,6 +10,7 @@ on:
|
||||
- 'composer.json'
|
||||
- 'composer.lock'
|
||||
- '.gitea/workflows/build-docker.yml'
|
||||
- 'version' # Change this file to force rebuild
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -42,14 +43,14 @@ jobs:
|
||||
docker push "$IMAGE:${{ gitea.sha }}"
|
||||
docker push "$IMAGE:latest"
|
||||
|
||||
- name: Trigger deployment
|
||||
run: |
|
||||
curl --fail-with-body \
|
||||
-X POST \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"image": "'"$IMAGE:${{ gitea.sha }}"'",
|
||||
"commit": "${{ gitea.sha }}",
|
||||
"repository": "${{ gitea.repository }}"
|
||||
}' \
|
||||
"${{ secrets.DEPLOY_WEBHOOK_URL }}"
|
||||
# - name: Trigger deployment
|
||||
# run: |
|
||||
# curl --fail-with-body \
|
||||
# -X POST \
|
||||
# -H "Content-Type: application/json" \
|
||||
# -d '{
|
||||
# "image": "'"$IMAGE:${{ gitea.sha }}"'",
|
||||
# "commit": "${{ gitea.sha }}",
|
||||
# "repository": "${{ gitea.repository }}"
|
||||
# }' \
|
||||
# "${{ secrets.DEPLOY_WEBHOOK_URL }}"
|
||||
@@ -1,12 +1,23 @@
|
||||
/node_modules
|
||||
/public/hot
|
||||
/public/storage
|
||||
/storage/*.key
|
||||
/vendor
|
||||
/.idea
|
||||
/.vagrant
|
||||
.phpunit.cache
|
||||
node_modules
|
||||
app/public/build
|
||||
app/public/hot
|
||||
app/public/storage
|
||||
app/storage/*.key
|
||||
app/bootstrap
|
||||
app/storage
|
||||
bootstrap/cache
|
||||
vendor
|
||||
.env
|
||||
.env.backup
|
||||
.env.production
|
||||
.phpunit.result.cache
|
||||
Homestead.json
|
||||
Homestead.yaml
|
||||
auth.json
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
.env
|
||||
.fleet
|
||||
.idea
|
||||
.vscode
|
||||
update
|
||||
@@ -1,4 +1,7 @@
|
||||
FROM php:8.3-apache
|
||||
FROM php:8.3.37-apache
|
||||
|
||||
# Install Node.js
|
||||
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && apt-get install -y nodejs
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
git \
|
||||
@@ -43,22 +46,28 @@ RUN echo '<Directory /var/www/app/public>\n\
|
||||
</Directory>' > /etc/apache2/conf-available/laravel.conf \
|
||||
&& a2enconf laravel
|
||||
|
||||
# Copy app files (composer/npm setup happens at runtime via entrypoint)
|
||||
COPY composer.json composer.lock ./
|
||||
COPY package.json package-lock.json* ./
|
||||
COPY scripts/ ./scripts/ 2>/dev/null
|
||||
|
||||
# Note: for Laravel, the COPY . . needs to be before the composer install
|
||||
COPY . .
|
||||
|
||||
RUN composer install \
|
||||
--no-dev \
|
||||
--prefer-dist \
|
||||
--no-interaction \
|
||||
--optimize-autoloader
|
||||
|
||||
# Create storage directories
|
||||
RUN mkdir -p \
|
||||
storage/app \
|
||||
storage/framework/cache/data \
|
||||
storage/framework/sessions \
|
||||
storage/framework/views \
|
||||
&& chown -R www-data:www-data storage bootstrap/cache \
|
||||
&& chmod -R ug+rwx storage bootstrap/cache
|
||||
storage/logs \
|
||||
bootstrap/cache \
|
||||
public/assets/vendor
|
||||
|
||||
# Copy and set up entrypoint script
|
||||
COPY docker-entrypoint.sh /usr/local/bin/
|
||||
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||
|
||||
EXPOSE 80
|
||||
@@ -1,38 +0,0 @@
|
||||
FROM php:8.2-apache
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get -y install \
|
||||
g++ \
|
||||
libcurl4-gnutls-dev \
|
||||
libxml2-dev \
|
||||
libxslt-dev \
|
||||
libzip-dev \
|
||||
zlib1g-dev \
|
||||
msmtp \
|
||||
unzip \
|
||||
git \
|
||||
ssl-cert \
|
||||
locales \
|
||||
--no-install-recommends \
|
||||
&& docker-php-ext-install pdo pdo_mysql mysqli xsl xml zip opcache \
|
||||
&& a2enmod rewrite ssl proxy proxy_http headers \
|
||||
&& apt-get purge -y g++ \
|
||||
&& apt-get autoremove -y \
|
||||
&& rm -r /var/lib/apt/lists/*
|
||||
|
||||
# Get latest Composer
|
||||
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
||||
|
||||
# Update the default apache site with the config we created.
|
||||
ADD docker/apache.dev.conf /etc/apache2/sites-enabled/000-default.conf
|
||||
|
||||
WORKDIR /var/www/html
|
||||
COPY . /var/www/html
|
||||
|
||||
RUN mkdir -p storage/framework/{sessions,views,cache,cache/data} && \
|
||||
chown -R www-data:www-data storage/framework && \
|
||||
chmod -R 775 storage
|
||||
|
||||
# RUN php artisan cache:clear && \
|
||||
# php artisan config:clear && \
|
||||
# php artisan view:clear
|
||||
@@ -0,0 +1,15 @@
|
||||
* To add new packages, add a line below:
|
||||
```json
|
||||
"new-package": "^1.2.3"
|
||||
```
|
||||
|
||||
* If the npm name differs from vendor folder name: Also update the mapping in setup-vendor.js:
|
||||
```json
|
||||
'npm-name': { folder: 'vendor-folder', subdir: 'dist' }
|
||||
```
|
||||
|
||||
* Then regenerate lock file (do this locally, NOT in Docker)
|
||||
```bash
|
||||
rm package-lock.json
|
||||
docker run --rm -v "$PWD:/workspace" -w /workspace node:20 npm install --package-lock-only
|
||||
```
|
||||
@@ -2,13 +2,15 @@
|
||||
|
||||
namespace App\Console;
|
||||
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Console\Scheduling\Schedule;
|
||||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
||||
|
||||
class Kernel extends ConsoleKernel
|
||||
{
|
||||
private $API_URL;
|
||||
private $API_URL;
|
||||
|
||||
/**
|
||||
* The Artisan commands provided by your application.
|
||||
@@ -19,6 +21,22 @@ class Kernel extends ConsoleKernel
|
||||
//
|
||||
];
|
||||
|
||||
private function getFromApi($url, $file) {
|
||||
$response = Http::connectTimeout(5)
|
||||
->timeout(15)
|
||||
->withHeaders([
|
||||
'Host' => $this->API_HOST
|
||||
])
|
||||
->get($this->API_URL . $url);
|
||||
|
||||
if ($response->successful()) {
|
||||
Storage::disk('local')->put(
|
||||
$file,
|
||||
$response->body()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the application's command schedule.
|
||||
*
|
||||
@@ -27,39 +45,40 @@ class Kernel extends ConsoleKernel
|
||||
*/
|
||||
protected function schedule(Schedule $schedule)
|
||||
{
|
||||
$this->API_URL = env('API_URL', 'https://api.nhgooi.nl/');
|
||||
|
||||
// Update latest news (3 items)
|
||||
$schedule->call(function() {
|
||||
Storage::disk('local')->put('laatste_nieuws.json', file_get_contents($this->API_URL . 'nieuws/overzicht?pagina=1&aantal=3'));
|
||||
Storage::disk('local')->put('populair_nieuws.json', file_get_contents($this->API_URL . 'nieuws/populair'));
|
||||
})->everyMinute();
|
||||
|
||||
// Update now / later
|
||||
$schedule->call(function() {
|
||||
Storage::disk('local')->put('nu_straks.json', file_get_contents($this->API_URL . 'programma/schema/nustraks'));
|
||||
Storage::disk('local')->put('zojuist.json', file_get_contents($this->API_URL . 'programma/schema/recent'));
|
||||
})->everyMinute();
|
||||
|
||||
// Update latest podcasts (6 items)
|
||||
$schedule->call(function() {
|
||||
Storage::disk('local')->put('laatste_podcasts.json', file_get_contents($this->API_URL . 'podcast/overzicht?pagina=1&aantal=6'));
|
||||
})->everyMinute();
|
||||
|
||||
// Update calendar items
|
||||
$schedule->call(function() {
|
||||
Storage::disk('local')->put('regioagenda.json', file_get_contents($this->API_URL . 'agenda/overzicht'));
|
||||
})->everyMinute();
|
||||
|
||||
// Update blogs
|
||||
$schedule->call(function() {
|
||||
Storage::disk('local')->put('blogs.json', file_get_contents($this->API_URL . 'blog/overzicht'));
|
||||
})->everyMinute();
|
||||
|
||||
// Update featured images
|
||||
$schedule->call(function() {
|
||||
Storage::disk('local')->put('beelden.json', file_get_contents($this->API_URL . 'beelden/overzicht'));
|
||||
})->everyMinute();
|
||||
$this->API_URL = env('API_URL', 'https://api.nhgooi.nl/');
|
||||
$this->API_HOST = env('API_HOST', $this->API_URL);
|
||||
|
||||
// Update latest news (3 items)
|
||||
$schedule->call(function () {
|
||||
$this->getFromApi('nieuws/overzicht?pagina=1&aantal=3', 'laatste_nieuws.json');
|
||||
$this->getFromApi('nieuws/populair', 'populair_nieuws.json');
|
||||
})->everyMinute();
|
||||
|
||||
// Update now / later
|
||||
$schedule->call(function () {
|
||||
$this->getFromApi('programma/schema/nustraks', 'nu_straks.json');
|
||||
$this->getFromApi('programma/schema/recent', 'zojuist.json');
|
||||
})->everyMinute();
|
||||
|
||||
// Update latest podcasts (6 items)
|
||||
$schedule->call(function () {
|
||||
$this->getFromApi('podcast/overzicht?pagina=1&aantal=6', 'laatste_podcasts.json');
|
||||
})->everyMinute();
|
||||
|
||||
// Update calendar items
|
||||
$schedule->call(function () {
|
||||
$this->getFromApi('agenda/overzicht', 'regioagenda.json');
|
||||
})->everyMinute();
|
||||
|
||||
// Update blogs
|
||||
$schedule->call(function () {
|
||||
$this->getFromApi('blog/overzicht', 'blogs.json');
|
||||
})->everyMinute();
|
||||
|
||||
// Update featured images
|
||||
$schedule->call(function () {
|
||||
$this->getFromApi('beelden/overzicht', 'beelden.json');
|
||||
})->everyMinute();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -7,6 +7,8 @@ use Illuminate\Foundation\Bus\DispatchesJobs;
|
||||
use Illuminate\Foundation\Validation\ValidatesRequests;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Routing\Controller as BaseController;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Session;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Support\Facades\View;
|
||||
@@ -16,7 +18,9 @@ class Controller extends BaseController
|
||||
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
|
||||
|
||||
protected $API_URL;
|
||||
|
||||
protected $API_HOST;
|
||||
|
||||
|
||||
private function getDataFromFileAndConvert($file, $path, $class, $maxItems = 0)
|
||||
{
|
||||
$data = json_decode(Storage::get($file));
|
||||
@@ -38,6 +42,7 @@ class Controller extends BaseController
|
||||
{
|
||||
View::share('apiUrl', $this->API_URL = env('API_URL', 'http://api.6fm.nl/'));
|
||||
View::share('imgBase', env('IMAGE_BASE_URL', '/'));
|
||||
$this->API_HOST = env('API_HOST', $this->API_URL);
|
||||
|
||||
//View::share('onAir', file_get_contents(url('onair')));
|
||||
View::composer('widgets.laatstenieuws', function ($view) {
|
||||
@@ -92,7 +97,12 @@ class Controller extends BaseController
|
||||
);
|
||||
});
|
||||
View::composer('widgets.menu', function($view) {
|
||||
$view->with('items', json_decode(Storage::get('static/menu.json')));
|
||||
try {
|
||||
$menuData = json_decode(Storage::get('static/menu.json'));
|
||||
$view->with('items', $menuData ?? []);
|
||||
} catch (\Exception $e) {
|
||||
$view->with('items', []);
|
||||
}
|
||||
});
|
||||
|
||||
View::share('disableBanners', env('DISABLE_BANNERS', false));
|
||||
@@ -102,51 +112,73 @@ class Controller extends BaseController
|
||||
{
|
||||
if (config('app.env') == 'local') {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
app('db')->insert(
|
||||
'INSERT INTO `pagestats`(`type`, `item_id`, `visitor_ip`, `session`, `referer`) VALUES(:type, :id, :ip, :session, :referer)',
|
||||
[
|
||||
'type' => $type,
|
||||
'id' => $id,
|
||||
'ip' => $request->server('REMOTE_ADDR'),
|
||||
'session' => md5(Session::getId()),
|
||||
'referer' => $request->server('HTTP_REFERRER')
|
||||
]
|
||||
);
|
||||
// app('db')->insert(
|
||||
// 'INSERT INTO `pagestats`(`type`, `item_id`, `visitor_ip`, `session`, `referer`) VALUES(:type, :id, :ip, :session, :referer)',
|
||||
// [
|
||||
// 'type' => $type,
|
||||
// 'id' => $id,
|
||||
// 'ip' => $request->server('REMOTE_ADDR'),
|
||||
// 'session' => md5(Session::getId()),
|
||||
// 'referer' => $request->server('HTTP_REFERRER')
|
||||
// ]
|
||||
// );
|
||||
}
|
||||
|
||||
protected function API($url)
|
||||
{
|
||||
$arrContextOptions = [
|
||||
'ssl' => [
|
||||
"verify_peer" => false,
|
||||
"verify_peer_name" => false,
|
||||
],
|
||||
'http' => [
|
||||
'method' => 'GET',
|
||||
'header' => 'X-Api-Key: ' . sha1(request()->server('REMOTE_ADDR')) . "\r\n"
|
||||
. 'X-User-Agent: ' . request()->server('HTTP_USER_AGENT') . "\r\n"
|
||||
]
|
||||
];
|
||||
//\dump($http_response_header);
|
||||
$result = @file_get_contents($this->API_URL . $url, false, stream_context_create($arrContextOptions));
|
||||
return $result ? json_decode($result) : null;
|
||||
try {
|
||||
$response = Http::connectTimeout(5)
|
||||
->timeout(15)
|
||||
->withHeaders([
|
||||
'Host' => $this->API_HOST,
|
||||
'X-Api-Key' => sha1(request()->server('REMOTE_ADDR')),
|
||||
'X-User-Agent' => request()->server('HTTP_USER_AGENT')
|
||||
])
|
||||
->get($this->API_URL . $url);
|
||||
|
||||
if ($response->successful()) {
|
||||
$body = $response->body();
|
||||
return $body ? json_decode($body) : null;
|
||||
}
|
||||
Log::warning('API request failed', [
|
||||
'url' => $this->API_URL . $url,
|
||||
'status' => $response->status()
|
||||
]);
|
||||
return null;
|
||||
} catch (\Exception $e) {
|
||||
Log::error('API request error', [
|
||||
'url' => $this->API_URL . $url,
|
||||
'error' => $e->getMessage()
|
||||
]);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
protected function checkAPI($url)
|
||||
{
|
||||
return $this->get_http_response_code($this->API_URL . $url);
|
||||
return $this->getHttpResponseCode($url);
|
||||
}
|
||||
|
||||
protected function get_http_response_code($url)
|
||||
protected function getHttpResponseCode($url)
|
||||
{
|
||||
$headers = get_headers($url);
|
||||
return substr($headers[0], 9, 3);
|
||||
try {
|
||||
$response = Http::connectTimeout(5)
|
||||
->timeout(15)
|
||||
->withHeaders([
|
||||
'Host' => $this->API_HOST,
|
||||
'X-Api-Key' => sha1(request()->server('REMOTE_ADDR')),
|
||||
'X-User-Agent' => request()->server('HTTP_USER_AGENT')
|
||||
])
|
||||
->head($this->API_URL . $url);
|
||||
|
||||
return $response->status();
|
||||
} catch (\Exception $e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected static function JsonToDateTime($obj)
|
||||
{
|
||||
return is_object($obj) ? new \DateTime($obj->date, new \DateTimeZone($obj->timezone)) : \Carbon\Carbon::parse($obj)->setTimezone(date_default_timezone_get());
|
||||
@@ -169,13 +201,13 @@ class Controller extends BaseController
|
||||
public function getSidebareData()
|
||||
{
|
||||
$populair = [];
|
||||
$apiResult = $this->API('nieuws/populair?aantal=5');
|
||||
$apiResult = (object) $this->API('nieuws/populair?aantal=5');
|
||||
foreach ($apiResult->news as $_newsItem) {
|
||||
$populair[] = new \Model\NewsItem($_newsItem);
|
||||
}
|
||||
|
||||
$newsItems = [];
|
||||
$apiResult = $this->API('nieuws/overzicht?aantal=5');
|
||||
$apiResult = (object) $this->API('nieuws/overzicht?aantal=5');
|
||||
foreach ($apiResult->news as $_newsItem) {
|
||||
$newsItems[] = new \Model\NewsItem($_newsItem);
|
||||
}
|
||||
@@ -189,13 +221,15 @@ class Controller extends BaseController
|
||||
return view($slug);
|
||||
}
|
||||
|
||||
$page = $this->API('statisch/' . $slug);
|
||||
if ($page == null) {
|
||||
$page = (object) $this->API('statisch/' . $slug);
|
||||
if ($page == null || !isset($page->title)) {
|
||||
return abort(404);
|
||||
}
|
||||
|
||||
$page->published = Controller::JsonToDateTime($page->published);
|
||||
if ($page->edited) {
|
||||
if(isset($page->published)) {
|
||||
$page->published = Controller::JsonToDateTime($page->published);
|
||||
}
|
||||
if (isset($page->edited) && $page->edited) {
|
||||
$page->edited = Controller::JsonToDateTime($page->edited);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
<?php
|
||||
|
||||
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 channel must be listed
|
||||
| in the channels configuration array defined below.
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('LOG_CHANNEL', 'stack'),
|
||||
|
||||
'deprecations' => env('LOG_DEPRECATIONS_CHANNEL', 'null'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| 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' => \Monolog\Handler\SyslogUdpHandler::class,
|
||||
'handler_with' => [
|
||||
'host' => env('PAPERTRAIL_URL'),
|
||||
'port' => env('PAPERTRAIL_PORT'),
|
||||
'facility' => LOG_USER,
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
],
|
||||
],
|
||||
|
||||
'stderr' => [
|
||||
'driver' => 'monolog',
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'handler' => \Monolog\Handler\StreamHandler::class,
|
||||
'formatter' => env('LOG_STDERR_FORMATTER'),
|
||||
'with' => [
|
||||
'stream' => 'php://stderr',
|
||||
],
|
||||
],
|
||||
|
||||
'syslog' => [
|
||||
'driver' => 'syslog',
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'facility' => LOG_USER,
|
||||
],
|
||||
|
||||
'errorlog' => [
|
||||
'driver' => 'errorlog',
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
],
|
||||
|
||||
'null' => [
|
||||
'driver' => 'monolog',
|
||||
'handler' => \Monolog\Handler\NullHandler::class,
|
||||
],
|
||||
|
||||
'emergency' => [
|
||||
'path' => storage_path('logs/laravel.log'),
|
||||
],
|
||||
],
|
||||
|
||||
];
|
||||
@@ -0,0 +1,41 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
cd /var/www/app
|
||||
|
||||
# Set HOME for npm cache (www-data user needs writable cache directory)
|
||||
export HOME=/tmp
|
||||
|
||||
echo "Setting up dependencies..."
|
||||
|
||||
# Create vendor directories and fix permissions
|
||||
echo "Fixing permissions..."
|
||||
mkdir -p bootstrap/cache storage/framework storage/logs public/assets/vendor
|
||||
chown -R www-data:www-data bootstrap/cache storage/framework storage/logs public/assets/vendor
|
||||
chmod -R ug+rwX bootstrap/cache storage/framework storage/logs public/assets/vendor
|
||||
|
||||
# Install PHP dependencies
|
||||
echo "Installing PHP packages..."
|
||||
composer install \
|
||||
--no-dev \
|
||||
--prefer-dist \
|
||||
--no-interaction \
|
||||
--optimize-autoloader
|
||||
|
||||
# Install npm dependencies if package.json has dependencies
|
||||
if grep -q "\"dependencies\"" package.json; then
|
||||
echo "Installing npm packages..."
|
||||
npm ci --omit=dev
|
||||
node scripts/setup-vendor.js
|
||||
fi
|
||||
|
||||
# Fix permissions
|
||||
echo "Fixing permissions..."
|
||||
chown -R www-data:www-data \
|
||||
bootstrap/cache \
|
||||
public/assets/vendor
|
||||
|
||||
chmod -R ug+rwX bootstrap/cache
|
||||
|
||||
echo "✓ Setup complete, starting Apache..."
|
||||
exec apache2-foreground
|
||||
@@ -0,0 +1,14 @@
|
||||
|
||||
# Set ownership
|
||||
chown -R www-data:www-data .
|
||||
|
||||
# Normal permissions
|
||||
find . -type d -exec chmod 775 {} \;
|
||||
find . -type f -exec chmod 664 {} \;
|
||||
|
||||
# Laravel writable directories
|
||||
find storage bootstrap/cache -type d -exec chmod 775 {} \;
|
||||
find storage bootstrap/cache -type f -exec chmod 664 {} \;
|
||||
|
||||
# Laravel CLI
|
||||
chmod 755 artisan
|
||||
@@ -1,9 +1,18 @@
|
||||
{
|
||||
"name": "nhgooi.nl",
|
||||
"name": "workspace",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
"air-datepicker": "^3.5.0",
|
||||
"daterangepicker": "^3.1.0",
|
||||
"jquery": "^3.7.0",
|
||||
"jquery-ui": "^1.13.0",
|
||||
"moment": "^2.30.0",
|
||||
"wavesurfer.js": "^7.8.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"grunt": "^1.6.1",
|
||||
"grunt-contrib-concat": "^2.1.0",
|
||||
@@ -18,6 +27,12 @@
|
||||
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/air-datepicker": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmjs.org/air-datepicker/-/air-datepicker-3.6.0.tgz",
|
||||
"integrity": "sha512-+txUkqa949rXBJDmkQAIb/GehZECJYF4rm9XJxVYtEX22C9WvBpE/XwCUQZBopKIkpg4ycAySJ9lH3JOg9qQTw==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/ansi-styles": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
|
||||
@@ -241,6 +256,16 @@
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/daterangepicker": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/daterangepicker/-/daterangepicker-3.1.0.tgz",
|
||||
"integrity": "sha512-DxWXvvPq4srWLCqFugqSV+6CBt/CvQ0dnpXhQ3gl0autcIDAruG1PuGG3gC7yPRNytAD1oU1AcUOzaYhOawhTw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"jquery": ">=1.10",
|
||||
"moment": "^2.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/debug": {
|
||||
"version": "3.2.7",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
|
||||
@@ -1075,6 +1100,21 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/jquery": {
|
||||
"version": "3.7.1",
|
||||
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz",
|
||||
"integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/jquery-ui": {
|
||||
"version": "1.14.2",
|
||||
"resolved": "https://registry.npmjs.org/jquery-ui/-/jquery-ui-1.14.2.tgz",
|
||||
"integrity": "sha512-1gSl7PUjyipa2adSr780Ujk16faicrV7PjPPzPtvWk7tTqBnsqp67NNV9jZK2+BIxUPXWSnIUU/LBCgwgGZE+Q==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"jquery": ">=1.12.0 <5.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/js-yaml": {
|
||||
"version": "3.14.1",
|
||||
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
|
||||
@@ -1207,6 +1247,15 @@
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/moment": {
|
||||
"version": "2.30.1",
|
||||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz",
|
||||
"integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/ms": {
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
||||
@@ -1740,6 +1789,12 @@
|
||||
"node": ">= 0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/wavesurfer.js": {
|
||||
"version": "7.12.11",
|
||||
"resolved": "https://registry.npmjs.org/wavesurfer.js/-/wavesurfer.js-7.12.11.tgz",
|
||||
"integrity": "sha512-Sx0yZIz7jRJ9J9p7UL+pl9y0UQBB6UN/XNo+R7Gy4tCR5xZI9jMyA0dnt1R8TMVSQ4LZ10SeB2HJYQ+dV2dPSA==",
|
||||
"license": "BSD-3-Clause"
|
||||
},
|
||||
"node_modules/websocket-driver": {
|
||||
"version": "0.7.4",
|
||||
"resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz",
|
||||
|
||||
@@ -1,12 +1,24 @@
|
||||
{
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "grunt watch",
|
||||
"build": "grunt uglify concat",
|
||||
"postinstall": "node scripts/setup-vendor.js || true",
|
||||
"sass": "sass resources/assets/sass:public/css",
|
||||
"sass-watch": "sass --watch resources/assets/sass:public/css",
|
||||
"sass-minify": "sass resources/assets/sass/style.scss:public/css/style.min.css --style compressed",
|
||||
"sass-minify-watch": "sass --watch resources/assets/sass/style.scss:public/css/style.min.css --style compressed",
|
||||
"js-watch": "grunt watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"jquery": "^3.7.0",
|
||||
"jquery-ui": "^1.13.0",
|
||||
"moment": "^2.30.0",
|
||||
"daterangepicker": "^3.1.0",
|
||||
"wavesurfer.js": "^7.8.0",
|
||||
"air-datepicker": "^3.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"grunt": "^1.6.1",
|
||||
"grunt-contrib-concat": "^2.1.0",
|
||||
|
||||
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 183 KiB After Width: | Height: | Size: 183 KiB |
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 606 B After Width: | Height: | Size: 606 B |
|
Before Width: | Height: | Size: 417 B After Width: | Height: | Size: 417 B |
|
Before Width: | Height: | Size: 951 B After Width: | Height: | Size: 951 B |
|
Before Width: | Height: | Size: 637 B After Width: | Height: | Size: 637 B |
|
Before Width: | Height: | Size: 274 B After Width: | Height: | Size: 274 B |