Tell me your story. You are ready to create your next application. Have installed the latest version of node, then yarn, and are now ready to chant the main incantation:
yarn create next-app
Good for you! But now you want to share this with your new team member. What if they last updated their NodeJS environments in Node 6 days?
Well, fear not my friend, here is the docker-compose.yml file you need to include in your folder(the one that contains package.json):
command: sh -c "yarn; yarn dev;"
Now let me teach you how to teach your friends a new incantation. Tell your friends that the right steps for them to experience a flawlessly awesome development experience is:
- Clone the repo
- cd into the directory
- Make sure they have a wand whose core is made of the whiskers of a friendly whale (muggle translation: docker, and docker-compose are installed)
- and repeat with me:
docker-compose up -d
Check it out and let me know how it worked!
IMPORTANT: Do not use this to deploy. Maybe another visit to professor Dumbledore’s office will reveal how to do that, but later.