ABOUT
This is a pretty simple example, but in more complex scenarios you may want to have a .env.dev
file that is used for development and a .env.prd
for production.
Writing the Docker Compose File
Docker Compose needs a configuration file to work, this file is called docker-compose.yml
and it holds all the information Docker will need to manage our environment. We are still going to need out Dockerfile
for this, because Compose will call the image we created earlier.
Updating The Dockerfile
Let’s update our Dockerfile
to use the start.sh
instead of calling npm
directly: