version: '3' #run with docker-compose.override to handle Production environment and tests will run #docker-compose -f docker-compose.yml -f .\docker-compose.override.yml up --build #for accesing to any operation system use -it flag #docker run -it ubuntu networks: backend: services: firstservice: image: firstservice build: context: . dockerfile: FirstService/Dockerfile ports: - "8181:80" entrypoint: bash -c "sleep 20 && dotnet FirstService.dll" networks: - backend #restart: always depends_on: - "rabbitmq" - "redis" consumerservice: image: consumerservice build: context: . dockerfile: ConsumerService/Dockerfile entrypoint: bash -c "sleep 20 && dotnet ConsumerService.dll" networks: - backend #restart: always depends_on: - "rabbitmq" - "mongo" oauthserver: image: oauthserver build: context: . dockerfile: OAuthServer/Dockerfile ports: - "8183:80" networks: - backend redis: image: redis ports: - "8184:6379" networks: - backend mongo: image: mongo ports: - "8185:27017" networks: - backend rabbitmq: image: rabbitmq:3-management #command: /bin/bash -c "rabbitmq-server && rabbitmq-plugins enable rabbitmq_management" environment: - RABBITMQ_ERLANG_COOKIE=${RABBITMQ_ERLANG_COOKIE} - RABBITMQ_DEFAULT_USER=user - RABBITMQ_DEFAULT_PASS=password - RABBITMQ_DEFAULT_VHOST=${RABBITMQ_DEFAULT_VHOST} - RABBITMQ_NODENAME=rabbitmq #volumes: # - ./cluster-entrypoint.sh:/usr/local/bin/cluster-entrypoint.sh hostname: "rabbitmq" ports: - "5672:5672" - "8187:15672" #dashboard networks: - backend postgres: #bin/sh => psql -U postgres image: postgres ports: - "8189:5432" networks: - backend environment: POSTGRES_USER: 'user' POSTGRES_PASSWORD: 'password'