# Deploying with Docker Compose

The Docker Compose file is available in the GitHub repository <https://github.com/TonicAI/textual_docker_compose/tree/main>.

Fork the repository.

## Configuring and deploying Textual

To deploy Textual:

1. Rename **sample.env** to **.env**.
2. In **.env**, provide values for the required settings. These are not commented out and have `<FILL IN>` as a placeholder value:
   * `SOLAR_VERSION`  - Provided by Tonic.ai.
   * `SOLAR_LICENSE` - Provided by Tonic.ai.
   * `ENVIRONMENT_NAME` - The name that you want to use for your Textual instance. For example, `my-company-name`.
   * `SOLAR_SECRET` - The string to use for Textual encryption.
   * `SOLAR_DB_PASSWORD` - The password that you want to use for the Textual application database, which stores the metadata for Textual. Textual deploys a PostgreSQL database container for the application database.
3. To deploy and start Textual, run `docker-compose up -d`.

## Updating to a new version

To update to a new version of Textual:

1. In **.env**, change the value of `SOLAR_VERSION` to identify the version of Textual to update to.\
   \
   To find the latest version, review the [release notes](https://www.tonic.ai/product-release-notes/textual). The tag value is the version number, without the "V" prefix.
2. Run the following:

```
$ docker-compose down
$ docker-compose pull && docker-compose up -d
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tonic.ai/textual/textual-install-administer/deploying-a-self-hosted-instance/deploying-with-docker-compose.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
