Skip to content

Commit 073b21d

Browse files
committed
final bugs fix
1 parent a95d343 commit 073b21d

File tree

4 files changed

+32
-9
lines changed

4 files changed

+32
-9
lines changed

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Accepted values: 8.3 - 8.2
2-
ARG PHP_VERSION=8.3
1+
# Accepted values: 8.5+
2+
ARG PHP_VERSION=8.5
33

44
ARG COMPOSER_VERSION=latest
55

@@ -85,7 +85,7 @@ RUN apk update && \
8585
zip \
8686
intl \
8787
gd \
88-
redis \
88+
redis@stable \
8989
ldap \
9090
&& docker-php-source delete \
9191
&& rm -rf /var/cache/apk/* /tmp/* /var/tmp/*

app/Models/User.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,19 @@ public function canAccessFilament(): bool
133133

134134
public function canAccessPanel(Panel $panel): bool
135135
{
136+
// always allow access to the `app` panel for any authenticated user;
137+
// prior implementation required a `panel_user` role which caused
138+
// 403 errors immediately after login/registration for new accounts.
139+
if ($panel->getId() === 'app') {
140+
return true;
141+
}
142+
136143
if ($this->hasRole('super_admin')) {
137144
return true;
138145
}
139146

140147
return match ($panel->getId()) {
141148
'admin' => $this->hasRole('super_admin'),
142-
'app' => $this->hasRole('panel_user'),
143149
default => false,
144150
};
145151
}

docker-compose.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,21 @@ services:
44
context: .
55
dockerfile: Dockerfile
66
args:
7+
PHP_VERSION: 8.5
78
WWWUSER: 1000
89
WWWGROUP: 1000
910
image: genealogy-laravel
1011
container_name: genealogy-app
1112
restart: unless-stopped
1213
ports:
1314
- "8000:8000"
15+
env_file: .env
1416
environment:
1517
- CONTAINER_MODE=http
1618
- OCTANE_SERVER=frankenphp
1719
- WITH_HORIZON=false
1820
- WITH_SCHEDULER=true
1921
- RUNNING_MIGRATIONS_AND_SEEDERS=false
20-
- APP_KEY=base64:68xbFAxJ98M8nph3BZzbuugwMowd5wMCVr4dcYHh54c=
2122
- DB_CONNECTION=mysql
2223
- DB_HOST=mysql
2324
- DB_PORT=3306
@@ -27,8 +28,10 @@ services:
2728
- REDIS_HOST=redis
2829
- REDIS_PORT=6379
2930
volumes:
31+
- ./.env:/var/www/html/.env
3032
- ./storage/logs:/var/www/html/storage/logs
3133
- ./storage/app:/var/www/html/storage/app
34+
- ./public/build:/var/www/html/public/build
3235
depends_on:
3336
- mysql
3437
- redis
@@ -86,15 +89,16 @@ services:
8689
context: .
8790
dockerfile: Dockerfile
8891
args:
92+
PHP_VERSION: 8.5
8993
WWWUSER: 1000
9094
WWWGROUP: 1000
9195
image: genealogy-laravel
9296
container_name: genealogy-horizon
9397
restart: unless-stopped
98+
env_file: .env
9499
environment:
95100
- CONTAINER_MODE=horizon
96101
- WITH_HORIZON=true
97-
- APP_KEY=base64:68xbFAxJ98M8nph3BZzbuugwMowd5wMCVr4dcYHh54c=
98102
- DB_CONNECTION=mysql
99103
- DB_HOST=mysql
100104
- DB_PORT=3306
@@ -118,15 +122,16 @@ services:
118122
context: .
119123
dockerfile: Dockerfile
120124
args:
125+
PHP_VERSION: 8.5
121126
WWWUSER: 1000
122127
WWWGROUP: 1000
123128
image: genealogy-laravel
124129
container_name: genealogy-scheduler
125130
restart: unless-stopped
131+
env_file: .env
126132
environment:
127133
- CONTAINER_MODE=scheduler
128134
- WITH_SCHEDULER=true
129-
- APP_KEY=base64:68xbFAxJ98M8nph3BZzbuugwMowd5wMCVr4dcYHh54c=
130135
- DB_CONNECTION=mysql
131136
- DB_HOST=mysql
132137
- DB_PORT=3306
@@ -145,6 +150,15 @@ services:
145150
healthcheck:
146151
disable: true
147152

153+
# temporary helper service for building JS assets
154+
node:
155+
image: node:20-alpine
156+
working_dir: /app
157+
volumes:
158+
- ./:/app
159+
- ./vendor:/app/vendor
160+
command: sh -c "npm ci && npm run build"
161+
148162
volumes:
149163
mysql_data:
150164
driver: local
@@ -154,3 +168,5 @@ volumes:
154168
networks:
155169
genealogy-network:
156170
driver: bridge
171+
172+

routes/web.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@
2121
Route::post('/send-invitation', [TeamInvitationController::class, 'sendInvitation'])->name('send.invitation');
2222
Route::post('/accept-invitation/{token}', [TeamInvitationController::class, 'acceptInvitation'])->name('accept.invitation');
2323

24-
Route::redirect('/register', '/admin/register')->name('register');
25-
Route::redirect('/login', '/admin/login')->name('login');
24+
// redirect the public auth paths to the Filament `app` panel
25+
Route::redirect('/register', '/app/register')->name('register');
26+
Route::redirect('/login', '/app/login')->name('login');
2627

2728
Route::get('/privacy', fn() => view('pages.privacy'))->name('privacy');
2829
Route::get('/terms-and-conditions', fn() => view('pages.termsandconditions'))->name('terms.and.conditions');

0 commit comments

Comments
 (0)