forked from fair/matrix-puppeteer-line
Andrew Ferrazzutti
be1ec0217c
* Update Dockerfiles to work properly * Use latest available version of Alpine Linux * Update Puppeteer to 9.1.1 to match Chrome version available in latest Alpine Linux * Add docker script for Node process to allow custom config * Provide separate example config for running Node in docker TODO: Update SETUP.md with Docker instructions
18 lines
561 B
Bash
Executable File
18 lines
561 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if [ ! -w . ]; then
|
|
echo "Please ensure the /data volume of this container is writable for user:group $UID:$GID." >&2
|
|
exit
|
|
fi
|
|
|
|
if [ ! -f /data/config.json ]; then
|
|
cp example-config-docker.json /data/config.json
|
|
echo "Didn't find a config file."
|
|
echo "Copied default config file to /data/config.json"
|
|
echo "Modify that config file to your liking, then restart the container."
|
|
exit
|
|
fi
|
|
|
|
# Allow setting custom browser path via "executable_path" config setting
|
|
# TODO Decide if --no-sandbox is needed
|
|
xvfb-run yarn start --config /data/config.json |