Configure Variables in Environment Config
In Archibald for configuring your project we use the environment config files under environment folder. In most cases we hard code configuration entries, but in specific cases when we need to handle secrets, we should add placeholders which are then substituted with values from environment variables.
We do this because we don't want to have sensitive data in the git repositories, and we don't want to expose this data to the client application.
Apart from already mentioned it is important that sensitive information, secrets, credentials etc. that shouldn't be public we don't put into "app" object, because values from "app" object are transferred to the client and exposed publicly.
For your config to have your custom attrributes available you need to add it to the ProjectConfig interface under shop/client/interfaces.
import { defineConfig } from '@archibald/config';
import type { ProjectConfig } from 'shop/client/interfaces';
export default defineConfig<ProjectConfig>({
...
app: {
// No secrets should be added here
},
server: {
custom: '{{CUSTOM_KEY|fallback}}'
}
});