caprover / caprover-cli

Command Line Interface for https://github.com/caprover/caprover
72 stars 39 forks source link

How deploy works is not clear. #86

Closed nixilb closed 3 years ago

nixilb commented 3 years ago

Does it upload all the folder (as it is done in a maven deploy) ? What is uploaded?: only the git address (and captain def file) and a git pull is done on the server?

I don't understand why it asks me the git branch name. This point does not appear in the documentation. Is it mandatory that the code is git managed?

githubsaturn commented 3 years ago

It uses git command to create your archived version of your particular branch in .tar format. Then it uploads it to the server and cleans up the tar file.

nixilb commented 3 years ago

Clear.

nixilb commented 3 years ago

This means that "caprover deploy" from a console in a directory does NOT deploy that directory (but the clouded git version of):

Example 1

Result: the old removed php sample is deployed instead of the new HTML stuff

Example 2

Result: the modification is not uploaded

nixilb commented 3 years ago

No idea about the problems depicted above? Are the example true?

githubsaturn commented 3 years ago

Correct. CapRover uses git archive to create your build content. It doesn't use the "cloud" (remote) version of your git repo. It uses the latest commit on your local branch.

You can manually run git archive --format tar --output ./somefile to see what is sent to CapRover to build.