title: Docker secrets in docker-compose.yml
body: <p>I have encountered problems with usage of docker secrets in docker-compose. Here is my yml:</p>
  
  <pre><code>version: '3.6'
  
  secrets:
    aws_bucket_name:
      file: ./secrets/aws_bucket_name.txt
  
  services:
    my-service-name:
      image: my-service-name
      secrets:
        - aws_bucket_name
      build:
        context: .
        dockerfile: Dockerfile-dev
      volumes:
        - ./:/my-service-name
      ports:
        - 3000:3000
        - 9229:9229
      environment:
        AUTH_BASICAUTH_ENABLED: "true"
        NODE_ENV: "development"
  </code></pre>
  
  <p>So, If I understand it correctly I should have aws_bucket_name.txt in my project in secrets folder, that is truth.</p>
  
  <p>I'm trying to load data from this file through aws_bucket_name.</p>
  
  <p>When I build docker-compose I get this error:</p>
  
  <p>ERROR: for iothubtelemetryadapter_my-service-name_1  Cannot create container for service my-service-name: invalid mount config for type "bind": invalid mount path: 'C:/Users/anton.smatanik/Documents/project_name/secrets/aws_bucket_name.txt' mount path must be absolute</p>
  
  <p>Here is my project structure:</p>
  
  <p><a href="https://i.stack.imgur.com/ZWlca.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZWlca.png" alt="enter image description here"></a></p>