This project has been archived in favour of https://github.com/guardian/gudocs2
--
brew install nvm
and then
run nvm use
in the root of the project.npm install
key.json
from Google developer console into root directoryTo run the UI: ./dev-start-ui.sh
(this starts the redis server + builds the webapp on auto-reload)
To fetch the latest Google docs: ./dev-start-fetch.sh
OR:
npm run dev
npm run www
This deployment process is difficult to use and should be upgraded to RiffRaff asap
ssm into the Visuals server (you can now use ssm with Janus credentials; the instance lives in the Interactives AWS account).
ssm ssh -x -t visuals,PROD --profile interactives
Cd into the gudocs repo and git pull main. You may need to run commands like npm install
if you have eg. installed any different dependencies.
This server uses supervisor
to build apps on the box. To restart the apps, run the following:
sudo supervisorctl restart docs
sudo supervisorctl restart docsfetch
To see what each start/restart command does look at the docs
and docsfetch
entries in the supervisor.conf
file in the root of the server.
To check error logs for a process run supervisorctl tail -5000 procname stderr replacing the process name as appropriate.
Note: if testing anything from a branch, make sure to git checkout main when you're done.
More details on deploying to the Visuals Server here
npm run fetch
will fetch and update all docs/sheets shared with the service account email address. It will only refetch docs/sheets if they have changed.
npm run fetch -i <ID>
can be run to fetch an individual sheet, where