I thought it might be nice to have a docker compose up option to run all of the services all at once. It will be especially useful once we have a database.
We have a couple of decision points:
Run all services in docker.
Only run dependencies that this repo does not contain the source code for.
I don't think we should try to develop from within a docker container, so in my opinion, option 2 would be best to make it simple to spin up any extra services we don't have control over. We can run the client and server from our own dev machines, no need to containerize them during development.
However, it may still be useful to be able to run all services in Docker, but this should be done under a profile that enables the build and running of the server and client images. The purpose of this is to build and test the containers in a close-to-production-ish (we shouldn't allow ourselves to be fooled here) way. Not to develop from within a docker container, ie: hot reloading or whatever, hot-reloading is taken care of for the client and there are some other ways to accomplish this for the server.
Note: This is not docker-compose
From July 2023 Compose V1 stopped receiving updates. It's also no longer available in new releases of Docker Desktop.
I started to play with it, but am running into issues getting the client to make requests to the server successfully. I didn't spend too much time on it, so here's the compose.yaml file where I stopped:
Issue Description
I thought it might be nice to have a
docker compose up
option to run all of the services all at once. It will be especially useful once we have a database.We have a couple of decision points:
I don't think we should try to develop from within a docker container, so in my opinion, option 2 would be best to make it simple to spin up any extra services we don't have control over. We can run the client and server from our own dev machines, no need to containerize them during development.
However, it may still be useful to be able to run all services in Docker, but this should be done under a profile that enables the build and running of the server and client images. The purpose of this is to build and test the containers in a close-to-production-ish (we shouldn't allow ourselves to be fooled here) way. Not to develop from within a docker container, ie: hot reloading or whatever, hot-reloading is taken care of for the client and there are some other ways to accomplish this for the server.
Note: This is not
docker-compose
Supporting Documentation
Implementation Details
I started to play with it, but am running into issues getting the client to make requests to the server successfully. I didn't spend too much time on it, so here's the
compose.yaml
file where I stopped:Acceptance Criteria