> For the complete documentation index, see [llms.txt](https://docs.dockware.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dockware.io/tutorials/shopware-tutorials/shopware-and-mysql.md).

# Shopware and MySQL

**Can I use dockware in combination with other images?**

Dockware is a Docker image like every other image. You can combine it with 3rd party services such as Redis, Elasticsearch, a separate MySQL, Percona or anything else.

Make sure they are on the same Docker network and use the key names of the containers as host addresses.

Here's an example:

{% code title="docker-compose.yml" %}

```yaml
version: "3"

services:

    shopware:
      image: dockware/shopware:latest
      container_name: shopware
      ports:
         - "80:80"
      networks:
         - web

    db:
      image: mysql:5.7
      container_name: mysql
      networks:
        - web
      environment:
        - MYSQL_ROOT_PASSWORD=hidden
        - MYSQL_USER=shopuser
        - MYSQL_PASSWORD=secret
        - MYSQL_DATABASE=shopware

networks:
  web:
    external: false
```

{% endcode %}

To access the standalone MySQL instance you need to set the **correct host**.

{% hint style="info" %}
The host is the **name of your container** (here -> "db")
{% endhint %}

Different systems have different options to configure a database connection string.\
In Shopware 6, it would be inside the **.env** file as DATABASE\_URL.\
In Shopware 5, it is in the **config.php** file.

{% code title="SHOPWARE 6 (.env file inside docker)" %}

```yaml
DATABASE_URL=mysql://shopuser:secret@db:3306/shopware
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.dockware.io/tutorials/shopware-tutorials/shopware-and-mysql.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.
