Skip to content

Updated docs with my experience getting jsreport to work on amazon li… #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
42 changes: 42 additions & 0 deletions docs/amazon-linux-2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
The installation script for Amazon Linux

```bash
# install node.js
wget -qO- https://github.com/creationix/nvm/v0.33.11/install.sh | bash
# reopen terminal
nvm install 8.11.3

mkdir jsreportapp
cd jsreportapp
npm i -g jsreport-cli
curl https://intoli.com/install-google-chrome.sh | bash
# this is less secure, but it's the only way found to get puppeteer installed on amazon linux 2.
sudo npm i -S jsreport --unsafe-perm=true
jsreport init
jsreport configure

# change in the jsreport.config.json the following
# it makes chrome less secure but currently the only way on amazon linux 2
"chrome": {
"launchOptions": {
"args": ["--no-sandbox"]
}
}

# install chrome dependencies
wget -qO- https://intoli.com/install-google-chrome.sh | bash

# start jsreport to see it running on port 5488

jsreport start

# the next steps are optional to start jsreport on boot
npm install pm2 -g
pm2 start server.js
pm2 startup
# run the output of previous command

# optionally if you want to use older phantomjs for pdf rendering
npm i jsreport-phantom-pdf --save --save-exact
```