Open hsluoyz opened 3 weeks ago
@tangyang9464 @JalinWang @imp2002
I have identified the cause of the problem.
When I used Docker to install Casdoor, I initiated debugging on the /api/get-version-info
interface and received a return message of "msg": "repository does not exist"
. This indicates that this interface gets the version by reading the Git History. However, the content packaged into Docker does not include the Git History.
I found in controllers/systeminfo.go
that although there are two ways to get the version when this interface is called, in any case, when the first method fails, it will immediately return the exception to the front-end.
I think this interface should determine which method to use to obtain the version based on the runmode
in conf/app.conf
. If it is dev
, then obtain the version through Git History; If it is prod
, then obtain the version through version_info.txt
.
May I ask, how would it be more appropriate to solve this problem?
Or rather, follow the original logic of the program. First, try to obtain the version through Git History. If the retrieval fails, then retrieve the version through the version_info.txt
?
@hsluoyz
@seeleclover we will fix it by ourselves
OK, thanks.
Use Docker Option-1 to install Casdoor: https://casdoor.org/docs/basic/try-with-docker#option-1-use-the-toy-database
Go to: http://localhost:8000/sysinfo , the version is empty:
It should work like the non-Docker demo site: https://door.casdoor.com/sysinfo