Openletters is a Gatsby.js project that allows multi-campus organizations to manage content complexity and while retaining flexibility.
- Node v14.17
- gatsby-cli
- python3 pip3
.env.production
is used when gatsby build
is run, and .env.development
when gatsby develop
is used.
Use .env.example
as a guideline for both .env files.
Start gatsby on specific port:
gatsby develop --host 0.0.0.0 --port 8000
App http://localhost:8000
GraphiQL http://localhost:8000/__graphiql
Start only the GraphQL playground
$ GATSBY_GRAPHQL_IDE=playground gatsby develop
Source
Ports: Development: 8001 Production: 80
There are different ways to setup a development volume with different trade-offs. The one included on this project only links the source files. This will require to rebuild the container when a new package is installed:
docker-compose up --build
Run in development: docker-compose up
The only difference is the port mapping. To run the production docker container run:
docker-compose -f docker-compose.prod.yml up
Add the build tag if you have updated your gatsby website.
docker-compose -f docker-compose.prod.yml up --build
The global search is managed by Algolia. An account is required to be setup and env variables need to setup to work.
Handle by Algolia. Requires an account and the API keys to be added to .env
When changing the data structure on algolia-queries.js, change the enablePartialUpdates
to false, to allow the index to be reconstructed.
enablePartialUpdates: false
Is being managed by include-media.js https://www.npmjs.com/package/include-media
All dates are YYYYMMDD.
Managed by Storybooks (https://storybook.js.org/).
$ npm run storybook
MIT