Hacker News new | ask | show | jobs
by danielscrubs 2255 days ago
I tried Googling but I'd really appreciate some advice.

I have my own server for some hobby projects and I'd really want a plug and play solution for checking git-repos with docker-files and starting them with their own URL for different branches.

Right now, if I have 20 projects with 20 branches, that's 400 endpoints that needs to be configured.

And what's best practice with canary deployments via git.

So my question is, does it exist a solution and what should I search for besides CI/CD?

1 comments

So assuming , you will be using a single domain with 400 sub-domains, you could use an ansible role/playbook. that will - check-out code - build your docker image, start the container on some port - register your docker with nginx and create a virtual host - or register them with ALB and create a listener - make a subdomain for you app/branch

you can have branch-name, docker port and sub-domain as variable and define them at run time PS : Not the best solution, but could work for your use case