Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

210
Views
docker-compose scale service with independent volumes

I'm trying to write a compose-file using a service (node) that I'd like to scale to 3 containers. This service has a volume to be bond to my local system for persistence, but I'd like the different tasks having different binding on my system ? I tried to use the template {{.Task.Slot}} inside my docker-compose.yml as shown below, but I cannot figured out out to make it work...

version: '3.2'
services:
     node:
        build:
            context: ./node
        volumes:
            - nodeVol:/data
        command: ["myapp"]

volumes:
    nodeVol:
        external:
            name: './persistence/{{.Task.Slot}}'

Any idea of what went wrong ?

about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!