-
Copy .env-example to .env (this should work without modification)
-
Populate other .env files from the other repos:
.env.callbackfrom ereader-callback (.env.dist).env.shibbolethfrom shibboleth (shibboleth-common/.env.dist)
-
Log into GitHub Packages using one of the following
-
Using Personal Access Token
- Create GitHub classic personal access token with the
read:packagesscope and an expiration date a year from now. Unfortunately fine-grained is not supported - Log into GitHub Packages using the GitHub personal access token as the password:
docker login ghcr.io
- Create GitHub classic personal access token with the
-
Using OAuth Token with GitHub CLI
gh auth login --scopes read:packages gh auth token | docker login ghcr.io --password-stdin --username ${GITHUB_USERNAME}
-
-
Build and start the caddy service:
docker compose up -d caddy -
Pull other services:
docker compose pull -
Build and start the services:
docker compose up(note that the caddy service must be started first, otherwise you may receive an error from Docker about the network)
A file called proxy.pac is generated and hosted by Caddy, to simplify connecting to the services by domain name. To use it (assuming your Caddy service is accessible on localhost, set your proxy autoconfiguration URL to:
https://localhost:3128/proxy.pac
You will also need to add the rootCA.crt root certificate to your OS or browser's certificates manager. This certificate is available inside the biblemesh/shibboleth-common:1.0.0-dev Docker image, after this has been built.
nvm usenpm install- Copy .env-example.standalone to .env and update appropriately (DEV_NETWORK_IP for sure)
- Create a MySQL database using
db_structure.sqlandseeds.sql - Change auto-increment for the
booktable to be some large number so as to not conflict with other devs (since the same aws s3 bucket is used) - Complete AWS setup (needed for import of epub or audiobook + testing emails)
(Unless emails need to be tested, you may simply log in with dev@toadreader.com, grabbing the login code from the logs.)
npm start-
Run all tests:
npm test -
Run a specific test file (e.g.,
auth_routes.test.ts):npm test -- auth_routes -
Watch mode:
npm test -- --watch
- Make sure your
.envfiles are correctly populated. - Watch out for default setting assumptions (e.g., default language, video quality).
- All global states should be reset between tests to prevent cross-contamination.