-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
If the server is running in a network with a static IP it can be directly accessed from the CLI and workspaces Signed-off-by: Toma Puljak <[email protected]>
- Loading branch information
Showing
17 changed files
with
204 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// Copyright 2024 Daytona Platforms Inc. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package conversion | ||
|
||
import ( | ||
"github.com/daytonaio/daytona/pkg/apiclient" | ||
"github.com/daytonaio/daytona/pkg/server" | ||
) | ||
|
||
func ToServerConfig(serverConfigDto *apiclient.ServerConfig) *server.Config { | ||
if serverConfigDto == nil { | ||
return nil | ||
} | ||
|
||
config := &server.Config{ | ||
Id: *serverConfigDto.Id, | ||
ProvidersDir: *serverConfigDto.ProvidersDir, | ||
RegistryUrl: *serverConfigDto.RegistryUrl, | ||
ServerDownloadUrl: *serverConfigDto.ServerDownloadUrl, | ||
IpWithProtocol: serverConfigDto.IpWithProtocol, | ||
ApiPort: uint32(*serverConfigDto.ApiPort), | ||
LocalBuilderRegistryPort: uint32(*serverConfigDto.LocalBuilderRegistryPort), | ||
BuilderRegistryServer: *serverConfigDto.BuilderRegistryServer, | ||
BuildImageNamespace: *serverConfigDto.BuildImageNamespace, | ||
HeadscalePort: uint32(*serverConfigDto.HeadscalePort), | ||
BinariesPath: *serverConfigDto.BinariesPath, | ||
LogFilePath: *serverConfigDto.LogFilePath, | ||
DefaultProjectImage: *serverConfigDto.DefaultProjectImage, | ||
DefaultProjectUser: *serverConfigDto.DefaultProjectUser, | ||
DefaultProjectPostStartCommands: serverConfigDto.DefaultProjectPostStartCommands, | ||
BuilderImage: *serverConfigDto.BuilderImage, | ||
} | ||
|
||
if serverConfigDto.Frps != nil { | ||
config.Frps = &server.FRPSConfig{ | ||
Domain: *serverConfigDto.Frps.Domain, | ||
Port: uint32(*serverConfigDto.Frps.Port), | ||
Protocol: *serverConfigDto.Frps.Protocol, | ||
} | ||
} | ||
|
||
return config | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.