Before you begin
- Install the Upsun CLI.
-
Run the following commands to log in and connect the current Git repository to the correct Upsun project. Replace
<PROJECT_ID>with your project ID (runupsun projectsto list them).
1. Configure Meilisearch as an app
Add the following configuration to.upsun/config.yaml.
- This configuration uses the startup command defined by the image. The official Meilisearch image already starts Meilisearch and listens on
0.0.0.0:7700, so this example does not setweb.commands.startto override it. - The
/meili_datamount maps to the path used by the official image for indexes, dumps, and snapshots.
2. Set or update the Meilisearch master key
SetMEILI_MASTER_KEY as a sensitive runtime environment variable instead of committing it to .upsun/config.yaml.
-
Generate a long random value for the master key:
-
Use the generated value in place of
<LONG_RANDOM_MASTER_KEY>:
MEILI_MASTER_KEY variable already exists, update it:
3. Deploy the app
Commit the changes to.upsun/config.yaml and push them to Upsun:
4. Allocate Meilisearch resources
The first deployment defaults to a minimal resource allocation regardless of app type (0.5 CPU, 512 MB disk, and 1408 MB memory). That’s enough to boot the container, but not to handle real indexing and search traffic, so set a production baseline for the app:container_profile: HIGH_MEMORY, the Meilisearch app gets 2 CPU, about 4 GB RAM, 10 GB disk, and one instance. If your indexes, dumps, or snapshots grow past that, increase the disk size.
If you changed resources after the app was already deployed, redeploy the environment:
5. Validate the deployment
List the routes, and confirm that the HTTPS route mapped to themeilisearch app appears. You’ll use it in place of <MEILISEARCH_ROUTE> in the next step.
<MEILISEARCH_ROUTE> with the HTTPS route for the Meilisearch app:
/var/log/app.log and the container’s process state.
Updating the image version
To use a different Meilisearch version, update the version inimage.name: