News for hackers. Stuff that matters.
Re:Working on Multiple Web Projects with Docker Compose and ... by hknmtt on Wednesday October 04, 2023 @02:45AM (#37761674)
I am presently developing a project that runs five back-end servers and two front-end servers. I ended up solving the same issues of ports with traefik, like the author. But it must be said that traefik's configuration is a nightmare to get working as you need it to. Also ssl certificates are still humongous pain in the ass to get going on local machine even in 2023. And you cannot ignore them on local because of those retarded CORS that only bring pain and suffering to the developers and literally nothing to the consumer.

I do not use docker compose because each server is in active development so I cannot compile it into an image and I have to spin them all up manually. But I will use docker compose after i am done for front-end developers so they can keep developing the UI locally.

Re:Working on Multiple Web Projects with Docker Compose and ... by nikita2206 on Wednesday October 04, 2023 @03:09AM (#37761827)
> I do not use docker compose because each server is in active development so I cannot compile it into an image

I’m curious to know, are you actively developing all 5+2 codebases, or could you theoretically run half of them in docker and another half (the ones you’re actively changing) on the host?

Re:Working on Multiple Web Projects with Docker Compose and ... by hknmtt on Wednesday October 04, 2023 @05:03AM (#37762666)
It is one code base with multiple servers in it. It is a 5x Go + 2x Quasar. Mostly two Go servers are actively developed while the remaining three are quite static with sporadic changes. The UI servers are in active development with hotreload.
Re:Working on Multiple Web Projects with Docker Compose and ... by nikita2206 on Wednesday October 04, 2023 @08:07AM (#37763971)
Aha nice to know thanks!
Re:Working on Multiple Web Projects with Docker Compose and ... by throwaway6835-8 on Wednesday October 04, 2023 @04:25AM (#37762389)
> I do not use docker compose because each server is in active development so I cannot compile it into an image

That's something I've seen many times said by many people but I don't understand. Your code can be mounted from the host into the container. There's no need to rebuild images with each change. Inside such "development" container some form of watcher/auto-rebuild can run and recompile & restart your program after changes are made in code. Isn't it standard practice?

Re:Working on Multiple Web Projects with Docker Compose and ... by hknmtt on Wednesday October 04, 2023 @05:05AM (#37762676)
By definition containers are static. Of course I could use them but it would essentially only add one step into the build process and I would gain absolutely noting from it. And I have no reason to use containers only for the sake of using them.
Re:Working on Multiple Web Projects with Docker Compose and ... by throwaway6835-8 on Wednesday October 04, 2023 @06:27AM (#37763158)
> I would gain absolutely noting from it

What about isolation? Of runtime, ports, dependencies?

Re:Working on Multiple Web Projects with Docker Compose and ... by hknmtt on Wednesday October 04, 2023 @09:09AM (#37764544)
I already have that. Plus, you might have missed that I am talking about development environment.
Re:Working on Multiple Web Projects with Docker Compose and ... by StrangeSmells01 on Wednesday October 04, 2023 @07:09AM (#37763475)
> I do not use docker compose because each server is in active development so I cannot compile it into an image

I think a lot of people here can't imagine how this is possible. Docker is literally just the same thing as what's running on the server except in a chroot environment. And it gives you a ton of benefits like isolation, portability, infrastructure as code, a layer of security, etc.