version: '3' networks: rabbitmq: external: false postgres: external: false services: test-db: image: postgres:12 restart: always ports: - "127.0.0.1:5432:5432" environment: - POSTGRES_USER=input-service - POSTGRES_PASSWORD=input-service - POSTGRES_DB=input-service networks: - postgres volumes: - postres-volume:/var/lib/postgresql/data rabbitmq: image: "rabbitmq:3" hostname: "test-rabbitmq" environment: RABBITMQ_ERLANG_COOKIE: "akjahsfvbkueasnvfjkhsga" RABBITMQ_DEFAULT_USER: "rabbitmq" RABBITMQ_DEFAULT_PASS: "rabbitmq" RABBITMQ_DEFAULT_VHOST: "/" networks: - rabbitmq ports: - "127.0.0.1:15672:15672" - "127.0.0.1:5672:5672" volumes: postres-volume: