# docker-compose - n8n

```
version: "3"
services:

  n8n:
    image: n8nio/n8n
    restart: always
    ports:
      - "5678:443"
    environment:
      - N8N_BASIC_AUTH_ACTIVE=true
      - N8N_BASIC_AUTH_USER
      - N8N_BASIC_AUTH_PASSWORD
      - N8N_HOST=${SUBDOMAIN}.${DOMAIN_NAME}
      - N8N_PORT=443
      - N8N_PROTOCOL=https
      - NODE_ENV=production
      - WEBHOOK_URL=https://${SUBDOMAIN}.${DOMAIN_NAME}/
      - GENERIC_TIMEZONE=${GENERIC_TIMEZONE}
    volumes:
      - ${DATA_FOLDER}/.n8n:/home/node/.n8n
  nodedb:
    image: mysql:8.0.32
    container_name: nodedb
    restart: always
    ports:
      - "3306:3306"
    environment:
      MYSQL_DATABASE: nodedb
      MYSQL_ROOT_PASSWORD: you_root_pass_work
    volumes:
      - ${NODEDB_DATA_FOLDER}:/var/lib/mysql
```


---

# 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://dev-notes.vinguyen.blog/notes/docker-compose-samples/docker-compose-n8n.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.
