Problem
docker-compose.yml's migrate service sets NODE_ENV: production (line 78), but the api service doesn't. In compose deployments the api process runs without NODE_ENV set, so libraries that gate optimizations on process.env.NODE_ENV === 'production' silently fall back to dev mode:
- Express: view cache off
- Sequelize: extra debug paths active
- pg: pool sizing defaults differ
- Many others in the dep tree
Not a functional bug — every code path still works — but an operational quality issue: compose deployments aren't actually running in production mode by these libraries' standards, despite the operator's intent.
Fix
Add NODE_ENV: ${NODE_ENV:-production} to the api service environment block. Defaults compose to production mode; operators who explicitly want dev compose can override via NODE_ENV=development in .env.
Acceptance
Proudly Made in Nebraska. Go Big Red! 🌽 https://xkcd.com/2347/
Problem
docker-compose.yml's migrate service setsNODE_ENV: production(line 78), but the api service doesn't. In compose deployments the api process runs without NODE_ENV set, so libraries that gate optimizations onprocess.env.NODE_ENV === 'production'silently fall back to dev mode:Not a functional bug — every code path still works — but an operational quality issue: compose deployments aren't actually running in production mode by these libraries' standards, despite the operator's intent.
Fix
Add
NODE_ENV: ${NODE_ENV:-production}to the api serviceenvironmentblock. Defaults compose to production mode; operators who explicitly want dev compose can override viaNODE_ENV=developmentin.env.Acceptance
docker-compose.ymlapi service sets NODE_ENV with a production default.envdocumented in the inline commentProudly Made in Nebraska. Go Big Red! 🌽 https://xkcd.com/2347/