Compare commits
No commits in common. "9054c25d0e6a5c15c8bccbbbf4a442bf5157bc52" and "c1d8008b5d8ea7e9e55907227ac797cf93756b71" have entirely different histories.
9054c25d0e
...
c1d8008b5d
3 changed files with 23 additions and 48 deletions
|
|
@ -1,34 +1,26 @@
|
||||||
# Development Dockerfile with FrankenPHP
|
# Development Dockerfile with FrankenPHP
|
||||||
#
|
FROM dunglas/frankenphp:latest-php8.3-alpine
|
||||||
# Debian rather than Alpine so Playwright can run its own Chromium: it treats
|
|
||||||
# debian12 as an officially supported platform and has no musl build at all.
|
|
||||||
FROM dunglas/frankenphp:latest-php8.3-bookworm
|
|
||||||
|
|
||||||
# Install system dependencies + development tools. Node comes from NodeSource
|
# Install system dependencies + development tools
|
||||||
# rather than apt: bookworm ships Node 18, below what Vite 6 targets.
|
RUN apk add --no-cache \
|
||||||
RUN apt-get update \
|
nodejs \
|
||||||
&& apt-get install -y --no-install-recommends \
|
npm \
|
||||||
ca-certificates \
|
|
||||||
curl \
|
|
||||||
gnupg \
|
|
||||||
git \
|
git \
|
||||||
default-mysql-client \
|
mysql-client \
|
||||||
vim \
|
vim \
|
||||||
nano \
|
|
||||||
bash \
|
bash \
|
||||||
unzip \
|
nano \
|
||||||
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
|
chromium \
|
||||||
&& apt-get install -y --no-install-recommends nodejs \
|
nss \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
freetype \
|
||||||
|
harfbuzz \
|
||||||
|
ttf-freefont \
|
||||||
|
font-noto-emoji
|
||||||
|
|
||||||
# Playwright's browser lives outside the bind-mounted /app so a host node_modules
|
# Playwright ships glibc-linked browser builds that do not run on Alpine (musl),
|
||||||
# never shadows it; --with-deps pulls the shared libraries Chromium needs.
|
# so drive Alpine's own Chromium instead of downloading one.
|
||||||
ENV PLAYWRIGHT_BROWSERS_PATH=/opt/playwright
|
ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 \
|
||||||
COPY package.json package-lock.json /tmp/pw/
|
PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/bin/chromium-browser
|
||||||
RUN cd /tmp/pw \
|
|
||||||
&& npm ci --no-audit --no-fund \
|
|
||||||
&& ./node_modules/.bin/playwright install --with-deps chromium \
|
|
||||||
&& rm -rf /tmp/pw
|
|
||||||
|
|
||||||
# Install PHP extensions including xdebug for development
|
# Install PHP extensions including xdebug for development
|
||||||
RUN install-php-extensions \
|
RUN install-php-extensions \
|
||||||
|
|
|
||||||
|
|
@ -41,8 +41,9 @@ services:
|
||||||
# Vite
|
# Vite
|
||||||
VITE_HOST: "0.0.0.0"
|
VITE_HOST: "0.0.0.0"
|
||||||
|
|
||||||
# Chromium is baked into the image outside /app; see Dockerfile.dev
|
# Playwright drives Alpine's system Chromium (musl); see Dockerfile.dev
|
||||||
PLAYWRIGHT_BROWSERS_PATH: "/opt/playwright"
|
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"
|
||||||
|
PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH: "/usr/bin/chromium-browser"
|
||||||
volumes:
|
volumes:
|
||||||
# Mount entire project for hot reload with SELinux context
|
# Mount entire project for hot reload with SELinux context
|
||||||
- ../..:/app:Z
|
- ../..:/app:Z
|
||||||
|
|
|
||||||
|
|
@ -91,24 +91,6 @@ public function test_users_can_logout(): void
|
||||||
$this->assertGuest();
|
$this->assertGuest();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test_refresh_csrf_returns_the_current_token_to_a_guest(): void
|
|
||||||
{
|
|
||||||
$response = $this->getJson('/refresh-csrf');
|
|
||||||
|
|
||||||
$response->assertStatus(200);
|
|
||||||
$response->assertJson(['token' => csrf_token()]);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function test_refresh_csrf_returns_the_current_token_to_an_authenticated_user(): void
|
|
||||||
{
|
|
||||||
$user = Planner::factory()->create();
|
|
||||||
|
|
||||||
$response = $this->actingAs($user)->getJson('/refresh-csrf');
|
|
||||||
|
|
||||||
$response->assertStatus(200);
|
|
||||||
$response->assertJson(['token' => csrf_token()]);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function test_logout_invalidates_the_session(): void
|
public function test_logout_invalidates_the_session(): void
|
||||||
{
|
{
|
||||||
$user = Planner::factory()->create();
|
$user = Planner::factory()->create();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue