Hemanth_L Hello everyone, I'm self-hosting the REI3 application using Docker. I cloned the GitHub repository and built a custom r3 binary. However, when I replace the r3 binary inside the Docker container, the container fails to start. The container logs indicate a database version mismatch, even though I'm using version 3.10.2 for both the application and the database.
gabriel Hello and welcome to the forum 🙂 Could you please share the command you use to build r3 with? (such as: go build -ldflags "-X main.appVersion=2.5.1.2980")
gabriel You need to set a variable (appVersion) to tell your r3 binary which version it is. For the full documentation, see here: https://github.com/r3-team/r3#nut_and_bolt-build-rei3-yourself
Hemanth_L gabriel Ok now i have got the r3 binary file ill check it by replacing it inside the container
Hemanth_L @gabriel I tried to replace the r3 binary file from the r3.10.2_app container and when i restarted it the container log gave the below line, failed to set app version, strconv.Atoi: parsing "3.2.10": invalid syntax
Hemanth_L gabriel On my windows machine i used the below command to build the r3 binary file, $env:GOOS="linux" $env:GOARCH="amd64" go build -o r3 -ldflags "-X main.appVersion=3.2.10" I think i mismatched the versions, ill check once and get back
gabriel Please follow the syntax, as defined in the documentation: go build -ldflags "-X main.appVersion=2.5.1.2980" r3 has a 4-digit versioning syntax. The fourth digit (eg. the build number) is missing. Your version string "3.2.10" is also faulty if you want to target "REI3.10.2". A valid build string would look like this: go build -ldflags "-X main.appVersion=3.10.2.7000"
Hemanth_L I used go build -ldflags "-X main.appVersion=3.10.2.7000" command to build the r3 file and now i replaced it inside the docker container and now it worked thank you