Answer the question
In order to leave comments, you need to log in
There is a dev-docker-compose, I want to make testing-docker-compose, but I need the database volumes to be new - not to use the previous ones - how?
i have dev-docker-compose.yml there are several servers, several databases: postgres, redis etc...
now i want to create test-docker-compose.yml - i changed container/service names, for example now like this:
postgres:
image: postgres
restart: always
ports:
- "5432:5432"
volumes:
- postgres:/var/lib/postgresql/data
and now i have changed it to
test_postgres:
image: postgres
restart: always
ports:
- "5432: 5432"
volumes:
- test_postgres:/var/lib/postgresql/data
but when I go to the database using navicat or dbeaver, no matter what, I see the same data that was with the first version of dev-docker-compose.
that is, how do I create all the same services with the help of a new compose. but for the databases to be new? this is for running testing. I don't need to change or remove the bases of the previous compose. just skip tests and everything in new empty bases
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question