daytona icon indicating copy to clipboard operation
daytona copied to clipboard

feat: support server in daemon mode

Open Tpuljak opened this issue 11 months ago • 3 comments

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

Tpuljak avatar Mar 15 '24 15:03 Tpuljak

PR will be kept in draft until @idagelic tries it out on Windows.

Tpuljak avatar Mar 15 '24 15:03 Tpuljak

Haven't been able to get this running.

Running in a normal terminal window: 123 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: 1234 Doesn't work, but the service did get registered image Re-running: image Can do some more tests in a separate go project

idagelic avatar Mar 17 '24 15:03 idagelic

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.

Tpuljak avatar Mar 18 '24 10:03 Tpuljak