Hello all,
This is my first time using a docker-compose file. I have multiple projects (solutions) to make my project work, API, MVC, Gateway, they are all in their own solution. I would like my docker-compose in my MVC(front-end) project to be the main one that starts up. Is this the correct way to do this? I was hoping I don’t need to put all the projects in the same solution. Here is my docker-compose file and all the projects are in the same folder. I went to link a path to each Dockerfile but when it goes to the project not in the solution it cannot be built.(cant find the project) I tried starting with the C:/ path and using ../ to go back into the main folder with all the projects.
//docker-compose.yml
version: '3.4'
services:
harkinstech:
image: ${DOCKER_REGISTRY-}harkinstech
build:
context: .
dockerfile: Dockerfile
harkinsuserapi:
image: ${DOCKER_REGISTRY-}harkinsuserapi
build:
context: .
dockerfile: ..\HarkinsUserAPI\Dockerfile
//docker-compose.override.yml
version: '3.4'
services:
harkinstech:
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=https://+:443;http://+:80
ports:
- "50110:80"
- "50111:443"
volumes:
- ${APPDATA}/Microsoft/UserSecrets:/root/.microsoft/usersecrets:ro
- ${APPDATA}/ASP.NET/Https:/root/.aspnet/https:ro
harkinsuserapi:
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=https://+:443;http://+:80
ports:
- "50000:80"
- "50001:443"
volumes:
- ${APPDATA}/Microsoft/UserSecrets:/root/.microsoft/usersecrets:ro
- ${APPDATA}/ASP.NET/Https:/root/.aspnet/https:ro