Код: Выделить всё
services:
postgres:
image: postgres
environment:
- POSTGRES_PASSWORD=**
ports:
- 5432:5432
volumes:
- /var/lib/postgresql/data
mongodb:
image: mongo
environment:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=mongopw
ports:
- 27017:27017
volumes:
- /var/lib/mongodb/data
rabbitmq:
image: rabbitmq:3-management-alpine
ports:
- 5672:5672
- 15672:15672
auction-svc:
image: ***/auction-svc:latest
build:
context: .
dockerfile: src/AuctionService/Dockerfile
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://+:80
- RabbitMq__Host=rabbitmq
- ConnectionStrings__DefaultConnection=Server=postgres:5432;User Id=postgres;Password=**;Database=auctions
- IdentityServiceUrl=http://identity-svc
ports:
- 7001:80
depends_on:
- postgres
- rabbitmq
Код: Выделить всё
FROM mcr.microsoft.com/dotnet/sdk:8.0 as build
WORKDIR /app
EXPOSE 80
COPY Bidify.sln Bidify.sln
COPY src/AuctionService/AuctionService.csproj src/AuctionService/AuctionService.csproj
COPY src/SearchService/SearchService.csproj src/SearchService/SearchService.csproj
COPY src/GatewayService/GatewayService.csproj src/GatewayService/GatewayService.csproj
COPY src/Contracts/Contracts.csproj src/Contracts/Contracts.csproj
COPY src/IdentityService/IdentityService.csproj src/IdentityService/IdentityService.csproj
RUN dotnet restore Bidify.sln
COPY src/SearchService src/SearchService
COPY src/Contracts src/Contracts
WORKDIR /app/src/SearchService
RUN dotnet publish -c Release -o /app/src/out
FROM mcr.microsoft.com/dotnet/aspnet:8.0
WORKDIR /app
COPY --from=build /app/src/out .
ENTRYPOINT [ "dotnet", "SearchService.dll" ]
Я работаю над приложением для микросервиса. Внутри src у меня есть сервисы. Внутри моего приложения Bidify у меня есть файл docker-compose.yml. Я не могу найти решение этой проблемы
Подробнее здесь: https://stackoverflow.com/questions/790 ... e-yml-file