# Docker compose

{% hint style="info" %}
Docker for WriteBackExtreme is production ready since version 5.2.0. All versions before are **not** ready for production.
{% endhint %}

In the following example, we show how easy it is to set up a WriteBackExtreme application instance using the Docker Compose method:

```yaml
version: '3'

services:
  writebackextreme:
    container_name: writebackextreme
    image: ghcr.io/appsfortableau/writeback-extreme:latest
    environment:
      # not commented are required environment variables
      - WBE_LICENSE={License value}
      # be sure to include the schema (e.g. https://)
      - WBE_URL={external available domain}
    ports:
      - 8899:8080
    volumes:
      - writebackextreme_data:/app_data

# Create a volume to make the config, sqlite database and logs 
# folder persistend between startup's and updates.
volumes:
  writebackextreme_data:
```

Now you can run the `docker compose up` command to start the composed Docker service.

> Don't forget to add the `-d` to the startup command to "detach" the process, and run it in the background.

### Changing repository database

By default WriteBackExtreme Docker is configured to use `sqlite` as repository database. Via environment variables we have been able to support 3 other databases, to be used as repository database:&#x20;

* [MS SQL Server](/writebackextreme/getting-started/getting-started/containerization/repository-database.md#ms-sql-server)
* [PostgreSQL](/writebackextreme/getting-started/getting-started/containerization/repository-database.md#postgresql)
* [MySQL](/writebackextreme/getting-started/getting-started/containerization/repository-database.md#mysql)

Checkout there documentation for setup environment variables to connect with the repository database.

{% hint style="info" %}
All available image versions can be found [here](https://github.com/appsfortableau/writeback-extreme/pkgs/container/writeback-extreme).
{% endhint %}

### Update WriteBackExtreme container with a new version

If a new version is available, run the following commands to update:

```bash
# First stop the current running instance:
docker-compose stop
# Download/update the latest version based upon image name in the docker-compose.yaml
docker-compose update
# start the docker-compose again, add -d for detatching the docker-compose
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.infotopics.com/writebackextreme/getting-started/getting-started/containerization/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.
