Docker Community Forums

Share and learn in the Docker community.

Create new testing_docker-compose for testing, create new volumes for it, dont use/change previous, how to?

0

I have dev-docker-compose.yml it has several backends and several databases: postgres, redis etc… Now i want to create test-docker-compose.yml - have changed the names of services. For example i had:

  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 connect to it with navicat or dbeaver- i see the same values that was in first variant, why? how to fix this?