daytona
daytona copied to clipboard
feat: support server in daemon mode
Description
This PR introduces support for running the server in daemon mode by running daytona server -d
.
It also adds server stop
and server restart
commands to control the daemon once it has been started.
Type of Change
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [x] This change requires a documentation update
Checklist
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
PR will be kept in draft until @idagelic tries it out on Windows.
Haven't been able to get this running.
Running in a normal terminal window:
Windows Services manipulation needs admin access so we should alert the user - running the command "net session" lets us know if the current terminal window has administrative privileges (https://stackoverflow.com/questions/7985755/how-to-detect-if-cmd-is-running-as-administrator-has-elevated-privileges)
Administrative privileges window:
Doesn't work, but the service did get registered
Re-running:
Can do some more tests in a separate go project
We've decided not to support daemon mode on Windows. A lot of problems with the service manager surfaced that are not worth investing time on right now.