Projects
Projects represent a comprehensive set of settings and resources that define how your code is managed, built, and deployed within a Workspace. Each Project is associated with a specific repository and contains the necessary configurations to ensure a consistent development environment.
Project Configuration
A project configuration is designed to simplify the management of development environments, allowing you to predefine settings that can be easily applied to any new or existing Workspace.
A project configuration contains all necessary properties to define and manage projects within a Workspace. It stores information such as the repository URL, build configuration, and environment variables. This allows for easy reuse of previously set configurations, ensuring a consistent and reproducible setup across multiple Workspaces.
A project configuration encapsulates all the essential elements for setting up a project, including:
-
Repository URL
The URL of the Git repository associated with the Project.
-
Build Configuration
- Automatic auto-detects the most appropriate Builder for your project.
- Devcontainer utilizes a predefined development container specified by a
devcontainer.json
file. - Custom image builds the Project image by specifying a custom base container.
- None builds a Project by using the default base image (
daytonaio/workspace-project
).
-
Environment Variables
Environment variables are specified in the
KEY=VALUE
format. These variables are essential for the Project’s build and runtime environments. You can set the variables directly or pass them from the machine’s environment during execution. -
Project Configuration name
A unique identifier for the Project Configuration, which distinguishes it from other configurations within the system.
With the daytona project-config
command, you can add, view, update, list, set as default, or delete Project Configurations, giving you full control over the configuration and reuse of your Project setups across different Workspaces.
Add a Project Configuration
Daytona allows you to add a new Project Configuration, enabling you to store and reuse project properties across multiple Workspaces.
- Run the following command to add a new Project Configuration:
- Enter the repository URL of the project you want to configure.
- Select the build configuration for the project.
- Enter the environment variables for the project in the
KEY=VALUE
format.
- Enter a name for the Project Configuration.
Upon completion, Daytona will save the Project Configuration, allowing you to reuse it across multiple Workspaces.
Project Configuration Information
Daytona allows you to view detailed information of a Project Configuration, providing you with an overview of the properties stored within it.
- Run the following command to view the details of a Project Configuration:
Upon running this command, Daytona will display a list of your Project Configurations
- Select the Project Configuration you want to view.
Upon selecting the Project Configuration, Daytona will display the details of the selected configuration. You will be able to view the Project Configuration name, the repository URL it is linked to, the build configuration, and the Devcontainer path.
List Project Configuration
Daytona allows you to list all Project Configurations, providing you with an overview of the properties stored within each configuration.
- Run the following command to list all Project Configurations:
Upon running this command, Daytona will display a list of your Project Configurations. You will be able to view the Project Configuration name, the repository URL it is connected to, the build configuration, and if it is set as a default configuration.
Set Default Project Configuration
Daytona allows you to set a default Project Configuration, enabling you to define a configuration that will be used by default when creating new Workspaces.
- Run the following command to set a default Project Configuration:
- Select the Project Configuration you want to set as the default.
Upon selecting the default Project Configuration, Daytona will set it as the default configuration for new Workspaces.
Update Project Configuration
Daytona allows you to update an existing Project Configuration, enabling you to modify the properties stored within it.
- Run the following command to update a Project Configuration:
- Select the Project Configuration you want to update.
- Update the properties of the Project Configuration.
Upon completion, Daytona will save the updated Project Configuration, allowing you to reuse it across Workspaces.
Delete Project Configuration
Daytona allows you to delete an existing Project Configuration, enabling you to remove properties that are no longer needed.
- Run the following command to delete a Project Configuration:
- Select the Project Configuration you want to delete.