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
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 upBut wouldn't my project image would be even bigger because my docker-compose uses the MSSQL image as well?
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 basesOk 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?
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
I mean, I use it for my projects. Who cares if some rando pulls my image lmao
fair, just saying :p