---
title: "Comment by Rishabh Mishra on \"Docker Compose Node.js Environment Variables: All Methods\" | Hashnode"
description: "A useful comparison. For small projects, I would keep real secrets out of the image and out of any env_file in version control, and use environment: only for no"
url: "https://hashnode.com/posts/docker-compose-nodejs-environment-variables/6ae37ffc8be985b62d093a8f/comment/6ae407ef3ffc5d22a89bfa59"
---

[Discussion](https://hashnode.com/posts/docker-compose-nodejs-environment-variables/6ae37ffc8be985b62d093a8f)

Comment [Docker Compose Node.js Environment Variables: All Methods](https://hashnode.com/posts/docker-compose-nodejs-environment-variables/6ae37ffc8be985b62d093a8f)

[Rishabh Mishra](https://hashnode.com/@rushdeploy)

[Oct 30](https://hashnode.com/posts/docker-compose-nodejs-environment-variables/6ae37ffc8be985b62d093a8f/comment/6ae407ef3ffc5d22a89bfa59)

A useful comparison. For small projects, I would keep real secrets out of the image and out of any env\_file in version control, and use environment: only for non-secret config that changes per deploy.
