Fatima Logofatima
Getting Started

Deploy (CI/CD)

Deploying with Fatima is straightforward.

How

Currently, the only command you need for deploying is fatima generate.

Before building, make sure to run:

npx fatima@latest --process-env generate

Don't be scared if it shows you a high count of envs in your env.ts, those are the system variables.

Why --process-env?

This flag is used to load environments only from process.env, it will tell fatima to skip load functions declared in your config.

Ideally, every environment variable should be injected by your hosting provider, so you don't need to load them, they are already exposed in process.env.

This flag is useless 99% of the time, because fatima automatically loads from process.env if it doesn't find a matching load function in your config, it even warns you about what's going on.

However, let's say you want to load from .env.test locally, but from process.env in your CI/CD, then you can use this flag to make sure your client gets generated correctly.

At the end, keep it, won't hurt if you don't need custom loading in your pipeline.

Bundling

Fatima is a development dependency, it doesn't need to be bundled with your application.

This is specially useful for frontend, as you will get 0kb into your website bundle.

On this page