Skip to content

Commit 8df49a1

Browse files
committed
Update README and test customizing path
1 parent f7a7250 commit 8df49a1

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

README.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,19 @@
11
# heroku-playwright-chromium
2-
A buildpack to install the Chromium exe and its dependencies for us with playwright.
2+
A buildpack to install the Playwright Chromium executable ONLY.
3+
4+
5+
# Usage
6+
7+
1. Add this buildpack to your app alongside the [heroku-playwright-buildpack](https://github.com/playwright-community/heroku-playwright-buildpack).
8+
- The script CANNOT install the system requirements due to restrictions from Heroku. It's only able to install the Chromium exe.
9+
- Thus, we rely on [heroku-playwright-buildpack](https://github.com/playwright-community/heroku-playwright-buildpack) to get the other packages.
10+
2. Run and deploy
11+
12+
# Customization
13+
By default, this will install the necessary exe into a folder called `/browsers` under the build directory (the directory where the root script lives).
14+
15+
# Notes
16+
This was developed for usage with `playwright-python` in mind so support for other languages is unknown.
17+
18+
19+

bin/compile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ set -e
66
BUILD_DIR=$1
77

88
# modify the installation location
9+
if [ -z "$INSTALL_PATH" ]; then
10+
INSTALL_PATH="/browsers"
11+
fi
12+
13+
echo "Install path is $INSTALL_PATH"
914
export PLAYWRIGHT_BROWSERS_PATH=$BUILD_DIR/browsers
10-
# playwright install --with-deps chromium
1115
playwright install chromium

0 commit comments

Comments
 (0)