hol430 / server-manager

Web api for managing apsim server (aka FART) instances
0 stars 0 forks source link

Updating apsim-server #1

Open jbrider opened 2 years ago

jbrider commented 2 years ago

How does it find the apsim-server binary? It looks like it should be in the code/apsimx/bin folder, but I can't see where it is defined within the server-manager docker image?

Can you provide the command line for building the apsim-server binary on linux. I assume it will be similar to the one used in the docker file for server-manager, and I will eventually get something running, but will be easier if you can let me what you used to publish it.

hol430 commented 2 years ago

Wow, scary how fast you forget this stuff when not working on it :).

How does it find the apsim-server binary?

It assumes the apsim-server binary is on PATH somewhere.

To build: dotnet build

Publishing is a bit more complicated, as there are variables you need to consider like where/how you're running it, but something like this should get you started:

dotnet publish -c Release -f net6.0 -r linux-x64 --no-self-contained /path/to/ServerManager.csproj
jbrider commented 2 years ago

It doesn't take long!

I missed the copy into the docker container I think - I was looking at the path variable on the nectar box, not inside the docker image.

So next question is where is the docker file for apsim-server? I think I might look at adding a build of the apsim-server to the docker-compose so it updates everything - so if I can copy it, it will be much easier.

hol430 commented 2 years ago

The apsim-server dockerfile is here. It's built and pushed to dockerhub with every apsim release.

Edit: but yes, doing manual rebuilds is useful for getting bugfixes quickly propagated.

jbrider commented 2 years ago

Thank you - I hadn't found that repository yet. I thought it was working of the source code on the nectar box - hadn't made the link that it extracted it from the docker image.

I had to make some changes to the apsim file, which needed a newer version of apsim. The update for the apsim file worked perfectly, but didn't update the models.exe at the same time. Planning to make a docker-compose that will update the apsim-server and server-manager at the same time... when I get time.