Skip to content

Commit f0f018c

Browse files
Merge pull request #1430 from osacorp/main
Add Events module and update Filament pages with Docker config improv…
2 parents b84fe56 + 3cfafab commit f0f018c

File tree

25 files changed

+783
-221
lines changed

25 files changed

+783
-221
lines changed

.docker/octane/FrankenPHP/supervisord.frankenphp.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pidfile=/var/run/supervisord.pid
66

77
[program:octane]
88
process_name=%(program_name)s_%(process_num)02d
9-
command=php %(ENV_ROOT)s/artisan octane:start --server=frankenphp --host=0.0.0.0 --port=80 --admin-port=2019
9+
command=php %(ENV_ROOT)s/artisan octane:start --server=frankenphp --host=0.0.0.0 --port=8000 --admin-port=2019
1010
user=%(ENV_USER)s
1111
autostart=true
1212
autorestart=true
@@ -39,4 +39,4 @@ command=php %(ENV_ROOT)s/artisan schedule:clear-cache
3939
user=%(ENV_USER)s
4040
autostart=%(ENV_WITH_SCHEDULER)s
4141
autorestart=false
42-
stdout_logfile=%(ENV_ROOT)s/scheduler.log
42+
stdout_logfile=%(ENV_ROOT)s/scheduler.log

.docker/start-container

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ echo "Container mode: $container_mode"
99

1010
initialStuff() {
1111
php artisan storage:link; \
12+
php artisan package:discover; \
1213
php artisan optimize:clear; \
1314
php artisan event:cache; \
1415
php artisan config:cache; \
@@ -23,18 +24,9 @@ initialStuff() {
2324
if [ "$1" != "" ]; then
2425
exec "$@"
2526
elif [ ${container_mode} = "http" ]; then
26-
echo "Octane Server: $octane_server"
27+
echo "HTTP server: artisan serve"
2728
initialStuff
28-
if [ ${octane_server} = "frankenphp" ]; then
29-
exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.frankenphp.conf
30-
elif [ ${octane_server} = "swoole" ]; then
31-
exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.swoole.conf
32-
elif [ ${octane_server} = "roadrunner" ]; then
33-
exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.roadrunner.conf
34-
else
35-
echo "Invalid Octane server supplied."
36-
exit 1
37-
fi
29+
exec php artisan serve --host=0.0.0.0 --port=8000
3830
elif [ ${container_mode} = "horizon" ]; then
3931
initialStuff
4032
exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.horizon.conf

Dockerfile

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,21 @@ FROM composer:${COMPOSER_VERSION} AS vendor
1111

1212
WORKDIR /app
1313
COPY composer.json composer.lock /app/
14-
RUN composer install --no-dev --no-interaction --prefer-dist --optimize-autoloader --no-ansi --no-scripts --no-progress
14+
COPY vendor-local/laravel-gramps-xml /app/vendor-local/laravel-gramps-xml
15+
RUN composer install --no-dev --no-interaction --prefer-dist --optimize-autoloader --no-ansi --no-scripts --no-progress --ignore-platform-req=php --ignore-platform-req=ext-intl --ignore-platform-req=ext-bcmath
16+
17+
FROM node:${NODE_VERSION} AS node_modules
18+
19+
WORKDIR /app
20+
COPY package.json package-lock.json ./
21+
RUN npm ci --only=prod && \
22+
npm install --save-dev
23+
24+
WORKDIR /app
25+
COPY . .
26+
COPY --from=vendor /app/vendor ./vendor
27+
RUN npm run build && \
28+
rm -rf node_modules
1529

1630
FROM php:${PHP_VERSION}-cli-alpine
1731

@@ -28,7 +42,7 @@ ARG TZ=UTC
2842
ENV TERM=xterm-color \
2943
WITH_HORIZON=false \
3044
WITH_SCHEDULER=false \
31-
OCTANE_SERVER=swoole \
45+
OCTANE_SERVER=frankenphp \
3246
USER=octane \
3347
ROOT=/var/www/html \
3448
COMPOSER_FUND=0 \
@@ -72,11 +86,7 @@ RUN apk update && \
7286
intl \
7387
gd \
7488
redis \
75-
rdkafka \
76-
memcached \
77-
igbinary \
7889
ldap \
79-
swoole \
8090
&& docker-php-source delete \
8191
&& rm -rf /var/cache/apk/* /tmp/* /var/tmp/*
8292

@@ -109,9 +119,10 @@ COPY --chown=${USER}:${USER} --from=vendor /usr/bin/composer /usr/bin/composer
109119
COPY --chown=${USER}:${USER} --from=vendor /app/vendor /var/www/html/vendor
110120
COPY --chown=${USER}:${USER} composer.json composer.lock ./
111121

112-
RUN composer dump-autoload --classmap-authoritative --no-dev --no-interaction --no-ansi
122+
RUN composer dump-autoload --classmap-authoritative --no-dev --no-interaction --no-ansi --ignore-platform-req=php --no-scripts
113123

114124
COPY --chown=${USER}:${USER} . .
125+
COPY --chown=${USER}:${USER} --from=node_modules /app/public/build /var/www/html/public/build
115126

116127
RUN mkdir -p \
117128
storage/framework/sessions \
@@ -123,6 +134,7 @@ RUN mkdir -p \
123134

124135
COPY --chown=${USER}:${USER} .docker/supervisord.conf /etc/supervisor/
125136
COPY --chown=${USER}:${USER} .docker/octane/Swoole/supervisord.swoole.conf /etc/supervisor/conf.d/
137+
COPY --chown=${USER}:${USER} .docker/octane/FrankenPHP/supervisord.frankenphp.conf /etc/supervisor/conf.d/
126138
COPY --chown=${USER}:${USER} .docker/supervisord.*.conf /etc/supervisor/conf.d/
127139
COPY --chown=${USER}:${USER} .docker/php.ini ${PHP_INI_DIR}/conf.d/99-octane.ini
128140
COPY --chown=${USER}:${USER} .docker/start-container /usr/local/bin/start-container
@@ -132,6 +144,8 @@ RUN composer install \
132144
--no-interaction \
133145
--no-ansi \
134146
--no-dev \
147+
--ignore-platform-req=php \
148+
--no-scripts \
135149
&& composer clear-cache
136150

137151
COPY .env.example ./.env

app/Filament/Admin/Pages/ManageGeneralSettings.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace App\Filament\Admin\Pages;
44

55
use Filament\Schemas\Schema;
6-
use Filament\Schemas\Components\Section;
6+
use Filament\Forms\Components\Section;
77
use Filament\Forms\Components\TextInput;
88
use Filament\Forms\Components\Textarea;
99
use App\Settings\GeneralSettings;
@@ -89,4 +89,4 @@ public function form(Schema $schema): Schema
8989
]),
9090
]);
9191
}
92-
}
92+
}

app/Filament/App/Pages/DnaTriangulationPage.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
use Filament\Forms\Components\TextInput;
99
use Filament\Forms\Concerns\InteractsWithForms;
1010
use Filament\Forms\Contracts\HasForms;
11-
use Filament\Forms\Form;
11+
use Filament\Schemas\Schema;
1212
use Filament\Notifications\Notification;
1313
use Filament\Pages\Page;
1414
use Illuminate\Support\Facades\Auth;
@@ -17,11 +17,11 @@ class DnaTriangulationPage extends Page implements HasForms
1717
{
1818
use InteractsWithForms;
1919

20-
protected static ?string $navigationIcon = 'heroicon-o-chart-bar';
20+
protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-chart-bar';
2121

22-
protected static string $view = 'filament.app.pages.dna-triangulation-page';
22+
protected string $view = 'filament.app.pages.dna-triangulation-page';
2323

24-
protected static ?string $navigationGroup = '🧬 DNA & Genetics';
24+
protected static string|\UnitEnum|null $navigationGroup = '🧬 DNA & Genetics';
2525

2626
protected static ?string $navigationLabel = 'DNA Triangulation';
2727

@@ -43,25 +43,25 @@ public function mount(): void
4343
$this->form->fill();
4444
}
4545

46-
public function form(Form $form): Form
46+
public function form(Schema $schema): Schema
4747
{
4848
$userId = Auth::id();
4949
$userKits = Dna::where('user_id', $userId)->pluck('name', 'id')->toArray();
5050

51-
return $form
51+
return $schema
5252
->schema([
5353
Select::make('base_kit_id')
5454
->label('Base DNA Kit')
5555
->options($userKits)
5656
->required()
5757
->helperText('Select the primary DNA kit to match against others'),
58-
58+
5959
Select::make('compare_kit_ids')
6060
->label('Compare Against Kits (Optional)')
6161
->options($userKits)
6262
->multiple()
6363
->helperText('Leave empty to compare against all kits'),
64-
64+
6565
TextInput::make('min_cm')
6666
->label('Minimum cM Threshold')
6767
->numeric()

app/Filament/App/Pages/EditTeam.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace App\Filament\App\Pages;
44

55
use Override;
6-
use Filament\Schemas\Components\Section;
6+
use Filament\Forms\Components\Section;
77
use App\Models\Team;
88
use App\Models\User;
99
use Filament\Facades\Filament;

app/Filament/App/Pages/FacialRecognitionReviewPage.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66

77
class FacialRecognitionReviewPage extends Page
88
{
9-
protected static ?string $navigationIcon = 'heroicon-o-camera';
9+
protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-camera';
1010

11-
protected static string $view = 'filament.app.pages.facial-recognition-review-page';
11+
protected string $view = 'filament.app.pages.facial-recognition-review-page';
1212

1313
protected static ?string $navigationLabel = 'Review Photo Tags';
1414

1515
protected static ?string $title = 'Review Facial Recognition Tags';
1616

17-
protected static ?string $navigationGroup = '👥 Family Tree';
17+
protected static string|\UnitEnum|null $navigationGroup = '👥 Family Tree';
1818

1919
protected static ?int $navigationSort = 5;
2020
}

app/Filament/App/Resources/ChecklistTemplateResource.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
namespace App\Filament\App\Resources;
44

5-
use Filament\Schemas\Components\Section;
6-
use Filament\Schemas\Components\Grid;
5+
use Filament\Forms\Components\Section;
6+
use Filament\Forms\Components\Grid;
77
use Filament\Forms\Components\TextInput;
88
use Filament\Forms\Components\Select;
99
use Filament\Forms\Components\Textarea;
@@ -49,7 +49,7 @@
4949

5050
class ChecklistTemplateResource extends Resource
5151
{
52-
52+
5353
protected static ?string $model = ChecklistTemplate::class;
5454

5555
protected static string | \BackedEnum | null $navigationIcon = 'heroicon-o-clipboard-document-list';

app/Filament/App/Resources/ChecklistTemplateResource/Pages/ViewChecklistTemplate.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
use Filament\Actions\EditAction;
66
use Filament\Actions\Action;
7-
use Filament\Schemas\Components\Section;
8-
use Filament\Schemas\Components\Grid;
7+
use Filament\Forms\Components\Section;
8+
use Filament\Forms\Components\Grid;
99
use App\Filament\App\Resources\ChecklistTemplateResource;
1010
use Filament\Actions;
1111
use Filament\Resources\Pages\ViewRecord;

app/Filament/App/Resources/ChecklistTemplateResource/RelationManagers/TemplateItemsRelationManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace App\Filament\App\Resources\ChecklistTemplateResource\RelationManagers;
44

5-
use Filament\Schemas\Components\Grid;
5+
use Filament\Forms\Components\Grid;
66
use Filament\Forms\Components\TextInput;
77
use Filament\Forms\Components\Textarea;
88
use Filament\Forms\Components\Select;

0 commit comments

Comments
 (0)