payloadcms / create-payload-app

CLI for creating a new Payload project
12 stars 8 forks source link

Install packages before copying rest of code in Dockerfile template #15

Open dush-t opened 1 year ago

dush-t commented 1 year ago

The Dockerfile was copying the package*.json files, then copying the entire rest of the code, and then installing the dependencies. This defeats the purpose of copying package*.json first, since the build step cache will be invalidated whenever the code changes.

This PR moves the install command above the code copy command.

P.S. I didn't see any contribution guidelines, sorry if this PR does not adhere to a required template.