Fork me on GitHub
#docker
<
2021-09-29
>
Daniel Craig18:09:46

Hi, I have a clojurescript project running on nginx within docker which has a reverse proxy set up to a graphql service running in another docker container. This is working fine, but how can I improve the local dev experience? When I start my backend docker container and start the clojurescript app through cider, I get CORS errors because the reverse proxy is only in place if nginx is running. How can I make the reverse proxy part of my local dev flow?

Daniel Craig18:09:07

cross posted from #nginx

lukasz18:09:40

docker-compose will allow you to coordinate containers, setup dependencies between services etc

Daniel Craig18:09:15

my docker-compose runs great but how can I jack into it?

lukasz18:09:11

as in connect to the nrepl port?

Daniel Craig18:09:54

as in connect to shadowcljs that's running inside a docker container

Daniel Craig18:09:31

Maybe it's not as hard as I thought

lukasz18:09:47

ah, never used it - but you can def expose ports and volumes to your local software (e.g emacs)

Daniel Craig18:09:10

If I just start the containers running with docker-compose, and then expose the ports like you said, then I could get everything I needed

lukasz18:09:41

if you're on a Mac it gets a bit tricky because you do not have host networking, but there are workarounds

Daniel Craig18:09:53

Yeah I am on a mac

lukasz18:09:40

host.docker.internal will be your friend then :-)