.prettierrc
npm install -g yarn
to install yarn globally.yarn secrets
to sync development secrets from Bitwarden and save them to a local .env
file. Contact a leadership member for the Bitwarden password.
yarn secrets:login
and then yarn secrets:sync
instead of the above script..env
and next.config.js
.env
to your version control system.A running instance of MongoDB is required this project.
docker run --name mongodb -d -p 27017:27017 mongo
in your terminal0.0.0.0/0
(all IPs)Connect
→ Connect your application
and copy the connection string, set the username and password, and set this as MONGO_DB
in .env
nextjs
database. (or choose another name, but make sure to change it in .env
)Make sure you use Node 16. You can check your node version by running node -v
.
docker compose up
If you make any changes to the packages, you may need to rebuild the images. To do this, append --build
to the above docker compose up command.
The Dockerized application will have live-reloading of changes made on the host machine.
Note: On linux-based operating systems, if you come across an entrypoint permission error (i.e. process: exec: "./entrypoint.sh": permission denied: unknown
), run chmod +x ./entrypoint.sh
to make the shell file an executable.
Windows Users: If you come across this error exec ./entrypoint.sh: no such file or directory
when running the docker compose command, please follow this Stackoverflow thread to fix it.
To understand this code better, read the Code Tour.
yarn
yarn dev
yarn install
yarn start
^9.2.0
for styles, which includes native support for global CSS and CSS modulespages/_app.js
, which can cause issues with external packages@zeit/next-css
and adding it to next.config.js
, however you cannot use css modules and global css together with this package (and it defaults to global).