My scenario is that I have a bunch of next.js apps. I start all of them in production mode (yarn start
) by docker compose up
. The docker-compose
file looks like below
version: '3'
services:
website:
...
admin:
...
website-api:
...
admin-api:
...
When I'm coding a service, I'd like to re-run the container of that service in an interactive shell, so I could run whatever commands I needed (eg. yarn dev
or running test). And keep other services in production
Is there any way I can archive that?
I read about using another docker-compose.overwrite.yml
for development. But in my case, I only need one service run in development and keep others in production. So this solution is not fit for me.
Need help!