> ## Documentation Index
> Fetch the complete documentation index at: https://docs.emergence.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# em-core Chart

> Helm chart for deploying the CRAFT core platform — em-platform, em-user-service, em-user-portal, Keycloak, PostgreSQL and Redis.

# em-core Chart

`em-core` deploys the CRAFT core platform to a Kubernetes cluster. It includes all services required to run the platform's core capabilities.

## Components

| Component         | Image                                 | Purpose                                  |
| ----------------- | ------------------------------------- | ---------------------------------------- |
| `em-platform`     | `ghcr.io/emergenceai/em-platform`     | Main backend with workflow orchestration |
| `em-user-service` | `ghcr.io/emergenceai/em-user-service` | User management and authentication       |
| `em-user-portal`  | `ghcr.io/emergenceai/em-user-portal`  | Frontend web application                 |
| `keycloak`        | upstream Keycloak                     | Identity and access management           |
| `postgresql`      | `postgres:alpine`                     | Persistent data storage                  |
| `redis`           | `redis:alpine`                        | In-memory caching and session storage    |
| `nginx`           | upstream Nginx                        | Ingress and load balancing               |

## Quick start

<Steps>
  <Step title="Set environment variables">
    ```bash theme={null}
    export HOSTNAME=platform.example.com
    export KEYCLOAK_ADMIN_PASSWORD=<secure-password>
    export POSTGRES_PASSWORD=<secure-password>
    ```
  </Step>

  <Step title="Create namespace">
    ```bash theme={null}
    kubectl create namespace em-core
    ```
  </Step>

  <Step title="Create secrets">
    ```bash theme={null}
    kubectl create secret generic em-core-credentials \
      --namespace em-core \
      --from-literal=KEYCLOAK_ADMIN_PASSWORD=$KEYCLOAK_ADMIN_PASSWORD \
      --from-literal=POSTGRES_PASSWORD=$POSTGRES_PASSWORD
    ```
  </Step>

  <Step title="Install the chart">
    ```bash theme={null}
    helm install em-core oci://ghcr.io/emergenceai/em-charts/em-core \
      --version 0.0.8 \
      --namespace em-core \
      --set hostname=$HOSTNAME \
      --set postgresql.existingSecret=em-core-credentials \
      --set redis.existingSecret=em-core-credentials
    ```
  </Step>
</Steps>

## Using external PostgreSQL and Redis

For production deployments, disable the bundled databases and connect to managed instances:

```yaml theme={null}
# values.yaml
postgresql:
  enabled: false

redis:
  enabled: false

postgresql:
  existingSecret: my-external-db-credentials  # Secret must contain: POSTGRES_HOST, POSTGRES_PORT, POSTGRES_DB, POSTGRES_USER, POSTGRES_PASSWORD

redis:
  existingSecret: my-external-db-credentials  # Secret must contain: REDIS_HOST, REDIS_PORT
```

## Enabling HTTPS

Install [cert-manager](https://cert-manager.io) and configure a ClusterIssuer, then:

```yaml theme={null}
hostname: platform.example.com
schema: https

ingress:
  tls:
    enabled: true
    issuer: letsencrypt-prod
```

## Key values

| Value                              | Default                               | Description                                         |
| ---------------------------------- | ------------------------------------- | --------------------------------------------------- |
| `hostname`                         | `localhost`                           | External hostname for ingress and service discovery |
| `schema`                           | `http`                                | `http` or `https`                                   |
| `em-platform.image.repository`     | `ghcr.io/emergenceai/em-platform`     | em-platform image                                   |
| `em-user-service.image.repository` | `ghcr.io/emergenceai/em-user-service` | em-user-service image                               |
| `em-user-portal.image.repository`  | `ghcr.io/emergenceai/em-user-portal`  | em-user-portal image                                |
| `postgresql.enabled`               | `true`                                | Deploy bundled PostgreSQL                           |
| `redis.enabled`                    | `true`                                | Deploy bundled Redis                                |

The full values reference is in `charts/em-core/values.yaml` in the em-charts repository.

## Related

<CardGroup cols={2}>
  <Card title="em-data-insights Chart" icon="dharmachakra" href="/deployment/helm/em-data-insights">
    Extends em-core with data analysis and insights capabilities.
  </Card>

  <Card title="em-service Chart" icon="dharmachakra" href="/deployment/helm/em-service">
    Base chart used by em-core for each component.
  </Card>

  <Card title="Upgrades" icon="arrow-up" href="/deployment/helm/upgrades">
    Chart version upgrade procedures.
  </Card>
</CardGroup>
