Environment
InfrastructureA complete running copy of your app.
Local, preview, and production are separate copies with their own configuration and usually their own data. The difference that causes the most surprises is data volume.
See also Environment variable, Preview deployment
Environment variable
InfrastructureConfiguration supplied from outside your code.
A value handed to your program when it starts, so the same build can point at a test database locally and the real one in production. Where secrets live, because they must never be in code.
See also Secret, Environment