How to mount docker volume which is running in EC2 instance to EBS volume? What are the steps for that?

Currently ec2 instance is running and inside that docker container is running.
I have 2 containers running in EC2 instance.
1 – Aplication container.
2 – Data Base(CouchDb) container.
I need to store data which is in database to EBS volumes.
I have a docker-compose file and I’m bringing up containers using ‘docker-compose up’ command.

version: '2.1'
services:
  web:
    build: .
    ports:
     - "4200:4200"
     - "7020:7020"
    depends_on:
      couchdb:
        condition: "service_healthy"
    volumes:
      - ./app:/usr/src/app/app
  couchdb:
    image: "couchdb:1.7.1"
    ports:
     - "5984:5984"
    healthcheck:
        test: ["CMD", "curl", "-f", "http://localhost:5984/"]
        interval: 10s
        timeout: 90s
        retries: 9

Source: StackOverflow