Skip to content

Commit 434cac1

Browse files
committed
chore: update Docker Compose and Nixpacks configurations; add Playwright settings for improved browser handling and adjust run image for compatibility
1 parent 7e12811 commit 434cac1

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

docker-compose.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,15 @@ services:
22
# Main application service
33
lens:
44
image: bysages/lens:latest
5+
# Uncomment to build locally instead of using pre-built image:
6+
# build: .
57
container_name: lens-app
68
restart: unless-stopped
79
ports:
810
- "3000:3000"
11+
# Playwright recommended Docker configuration
12+
init: true
13+
ipc: host
914
environment:
1015
- NODE_ENV=production
1116
- DATABASE_URL=postgresql://lens:${POSTGRES_PASSWORD:-lens123}@postgres:5432/lens
@@ -19,6 +24,8 @@ services:
1924
- GITHUB_CLIENT_ID=${GITHUB_CLIENT_ID:-}
2025
- GITHUB_CLIENT_SECRET=${GITHUB_CLIENT_SECRET:-}
2126
- ALLOWED_DOMAINS=${ALLOWED_DOMAINS:-}
27+
# Playwright configuration for official image
28+
- PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
2229
depends_on:
2330
postgres:
2431
condition: service_healthy
@@ -31,6 +38,7 @@ services:
3138
volumes:
3239
- lens-cache:/app/.cache
3340
- lens-uploads:/app/uploads
41+
# Playwright browsers are pre-installed in official image at /ms-playwright
3442

3543
# PostgreSQL database
3644
postgres:

nixpacks.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ cmds = [
1414
]
1515

1616
[start]
17-
runImage = "node:22-bookworm"
17+
runImage = "mcr.microsoft.com/playwright:v1.53.0-noble"
1818
onlyIncludeFiles = [".output"]
19-
cmd = "npx playwright@1.53.1 install chromium-headless-shell --with-deps && node .output/server/index.mjs"
19+
cmd = "node .output/server/index.mjs"

0 commit comments

Comments
 (0)