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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ stop:
down: stop
$(sail) down --remove-orphans --rmi local
destroy: stop
$(sail) down server -v --remove-orphans --rmi all
$(sail) down laravel.testing -v --remove-orphans --rmi all

#
# DB
Expand Down
28 changes: 28 additions & 0 deletions app/Providers/TelescopeServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ class TelescopeServiceProvider extends TelescopeApplicationServiceProvider
public function register(): void
{
$this->hideSensitiveRequestDetails();
$this->configureDarkMode();

$isLocal = $this->app->environment('local');

Telescope::filter(function (IncomingEntry $entry) use ($isLocal) {
return $isLocal
|| $entry->isEvent()
|| $entry->hasMonitoredTag()
|| $entry->isFailedRequest()
|| $entry->isLog()
Expand All @@ -41,6 +43,32 @@ protected function hideSensitiveRequestDetails(): void
]);
}

/**
* Match Telescope's own dashboard theme to the app-wide `appearance`
* preference (see HandleAppearance middleware and
* resources/js/composables/useAppearance.ts). Telescope::css() inlines
* one of two fully-compiled Bootstrap stylesheets (dist/styles.css or
* dist/styles-dark.css) chosen by the static Telescope::$useDarkTheme
* flag, so — unlike the main app's `.dark` class toggle, which lets one
* stylesheet react to both states — the choice has to be made here,
* request-time, before that view renders, and can't be flipped
* client-side afterwards without a full reload.
*
* The `appearance` cookie is read directly off the request rather than
* via the shared view value, since provider registration runs before
* the `web` middleware group (incl. HandleAppearance) executes; reading
* it here is safe because bootstrap/app.php excludes `appearance` from
* cookie encryption. A `system` preference (or no cookie yet) falls
* back to the light theme, since the server has no way to know the
* browser's OS-level preference on this request.
*/
protected function configureDarkMode(): void
{
if (request()->cookie('appearance') === 'dark') {
Telescope::night();
}
}

protected function gate(): void
{
Gate::define('viewTelescope', function (User $user) {
Expand Down
22 changes: 3 additions & 19 deletions compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: ByteLyon
services:
server:
laravel.testing:
build:
context: './docker/server/8.5'
context: './docker/8.5'
dockerfile: Dockerfile
args:
WWWGROUP: '${WWWGROUP:-1000}'
Expand Down Expand Up @@ -35,7 +35,7 @@ services:
POSTGRES_PASSWORD: '${DB_PASSWORD:-secret}'
volumes:
- 'sail-pgsql:/var/lib/postgresql'
- './docker/server/pgsql/create-testing-database.sql:/docker-entrypoint-initdb.d/10-create-testing-database.sql'
- './docker/pgsql/create-testing-database.sql:/docker-entrypoint-initdb.d/10-create-testing-database.sql'
networks:
- sail
healthcheck:
Expand Down Expand Up @@ -63,22 +63,6 @@ services:
test: ['CMD', 'redis-cli', 'ping']
retries: 3
timeout: 5s
worker:
build:
context: './docker/worker'
dockerfile: Dockerfile
image: 'worker-1.0/app'
environment:
AWS_ACCESS_KEY_ID: '${AWS_ACCESS_KEY_ID}'
AWS_DEFAULT_REGION: '${AWS_DEFAULT_REGION:-us-east-1}'
AWS_SECRET_ACCESS_KEY: '${AWS_SECRET_ACCESS_KEY}'
LARAVEL_BASE_URL: 'http://server'
LARAVEL_WORKER_TOKEN: '${API_TOKEN}'
SCRAPE_JOBS_QUEUE_URL: '${SQS_PREFIX}/${SQS_QUEUE}'
networks:
- sail
deploy:
replicas: ${WORKER_REPLICAS:-10}
networks:
sail:
driver: bridge
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
131 changes: 0 additions & 131 deletions docker/images/seleniumbase-base/Dockerfile

This file was deleted.

130 changes: 0 additions & 130 deletions docker/images/seleniumbase-base/INSTRUCTIONS.md

This file was deleted.

Loading
Loading