C
C#3d ago
surwren

Proper way to deploy application?

So right now I scp my entire project to the CVM, build and then docker compose up The scp parts takes absolutely forever it's outrageous (project is about 117+mb) Am I stupid and just doing this wrong? Am I missing something? I haven't explored CICD pipelines yet
7 Replies
Pobiega
Pobiega3d ago
if you are already using docker, why not just pull the project image too? ie, on your dev machine or CICD pipeline, you build and push the container image then on your deployment machine, you simply docker pull imagename:latest and finally docker compose up
surwren
surwrenOP3d ago
But wouldn't my project image would be even bigger because my docker-compose uses the MSSQL image as well?
Pobiega
Pobiega3d ago
thats unrelated a compose is made up of multiple images if you are already doing docker compose up on your server, you are already pulling and deploying mssql Im just suggesting you package your current project as an image, instead of as source to then be built on the server in fact, you'll save a little time on the server as it doesnt ahve to pull the intermediate build bases
surwren
surwrenOP3d ago
Ok I had literally no idea what I didn't know, I just found out there are Docker registries lmao I guess I should use Docker Hub or GH container registry because they are free tiers?
Pobiega
Pobiega3d ago
Docker hub is public, as far as I'm aware So that means anyone could pull your image from there You'll want a private registry
jcotton42
jcotton423d ago
I mean, I use it for my projects. Who cares if some rando pulls my image lmao
Pobiega
Pobiega3d ago
fair, just saying :p
Want results from more Discord servers?
Add your server