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

Add a server environment for running in Docker #284

Open
XanderStoffels opened this issue Oct 13, 2022 · 2 comments
Open

Add a server environment for running in Docker #284

XanderStoffels opened this issue Oct 13, 2022 · 2 comments
Labels
bug Something isn't working docker Relates to docker support good first issue Good for newcomers hacktoberfest Issues for hacktoberfest people! priority: medium Moderately important server Relates to the server implementation

Comments

@XanderStoffels
Copy link
Contributor

Currently, the default provided IServerEnvironment expects a terminal with standard input and output. When running in Docker, most of the time there is no standard input, causing the server to crash when waiting for input (Console.ReadKey, Console.ReadLine, etc).

Make a new IServerEnvironment that will be used by the console app based on a provided command line argument or environment variable. This environment should not expect any input from standard input.

@Naamloos
Copy link
Member

As of right now the server does not seem to be craching in docker for me, but it is important to at least have a version that properly runs in docker.

However I'd argue it's still good practice to prevent these issues anyway.

Docker creates a .dockerenv file in the filesystem root. Could check for that..

@Naamloos Naamloos added bug Something isn't working good first issue Good for newcomers server Relates to the server implementation priority: medium Moderately important hacktoberfest Issues for hacktoberfest people! docker Relates to docker support labels Oct 13, 2022
@Naamloos
Copy link
Member

With that I'd like to add that it may be nice to have some config vars be overrideable by environmant variables. For docker support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working docker Relates to docker support good first issue Good for newcomers hacktoberfest Issues for hacktoberfest people! priority: medium Moderately important server Relates to the server implementation
Projects
Status: Ready
Development

No branches or pull requests

2 participants