Db from docker-compose to docker swarm


I have an aplication on production without docker.-compose, I want to Switch to docker swarm to use secrets, the problem is that I want to use the same db but I dont know how to do it because it creates a new volume with the name of the swarm. This Is the old config: db: image: postgres:12.0-alpine expose: – 3306 environment: SECRETS volumes: – postgres_data:/var/lib/postgres/data/ volumes: postgres_data: Thank you 🙂

submitted by /u/randonim
[link] [comments]
Source: Reddit