Click here to Skip to main content
15,881,938 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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)

//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

What I have tried:

I tried starting with the C:/ path and using ../ to go back into the main folder with all the projects.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900