Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running without docker #2

Open
4censord opened this issue Feb 11, 2024 · 3 comments
Open

Running without docker #2

4censord opened this issue Feb 11, 2024 · 3 comments
Labels
backlog enhancement New feature or request

Comments

@4censord
Copy link
Contributor

While docker is often convenient, there are many reasons why one would want to run a service directly on the host, instead of through a container layer.

Currently, Attempting to run the project directly results in an error.

$ dotnet run Wave/Wave.csproj
Unable to run your project.
Ensure you have a runnable project type and ensure 'dotnet run' supports this project.
A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'.
The current OutputType is 'DockerCompose'.

I don't know enough about dotnet development to fix this myself.

@miawinter98
Copy link
Owner

Well, looking around the web a bit, it seems this is a use-case no one has ever required before.. the issue is basically that the project file is configured for docker, which changes the way c# and asp.net behave, and while fixing that would probably just be one or two lines in the project file, the project itself assumes certain configurations about the host system that it's container will fulfill.. like the /app/files or /app/configuration directories existing. I can put it on my list to find solutions for, probably need a secondary project file for building a standalone version, but it won't be as simple as just adding that to make it run without issues without a container.

@miawinter98 miawinter98 added enhancement New feature or request backlog labels Feb 11, 2024
@MechWipf
Copy link

MechWipf commented Feb 28, 2024

It should already be possible to run wave outside of a container.

  • Create a publish package with dotnet publish Wave/Wave.csproj
  • Copy the publish folder onto a machine with the .net8 runtime installed
  • Run dotnet Wave.dll inside the publish folder (don't forget to provide the correct environment variables)

The files (/app/files in the docker image) folder will be relative to your work directory.
Regarding /configuration, this should be made configurable via appsettings.json (And to be fair, everything in config.* should be configurable in this file)

Edit: And should means I tested that this works.

@4censord
Copy link
Contributor Author

4censord commented Mar 1, 2024

oh nice, thank you!

Do you know if there is any way to have dotnet run create a more helpfull error message, maybe pointing to this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants