docker

2021-09-29T18:31:46.034500Z

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?

2021-09-29T18:32:07.034600Z

cross posted from #nginx

lukasz 2021-09-29T18:40:40.034800Z

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

2021-09-29T18:44:15.035100Z

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

tvaughan 2021-09-29T18:46:31.035300Z

https://github.com/emacs-pe/docker-tramp.el

1
lukasz 2021-09-29T18:48:11.035600Z

as in connect to the nrepl port?

2021-09-29T18:48:54.035800Z

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

2021-09-29T18:50:31.036Z

Maybe it's not as hard as I thought

lukasz 2021-09-29T18:50:47.036200Z

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

2021-09-29T18:51:10.036400Z

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

lukasz 2021-09-29T18:51:41.036600Z

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

2021-09-29T18:51:53.036800Z

Yeah I am on a mac

2021-09-29T18:51:56.037Z

😁

lukasz 2021-09-29T18:52:40.037200Z

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

2021-09-29T18:52:53.037400Z

😁 thanks