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

Example project to showcase how to use dev env vars in Daytona #123

Merged
merged 7 commits into from
Dec 21, 2024

Conversation

bellatrick
Copy link
Contributor

@bellatrick bellatrick commented Nov 26, 2024

/claim #29

Loom Link

Writer's Checklist

Writing Structure

  • Use short sentences and paragraphs, and include bucket brigades.
  • Include more than two descriptive H2 headings to organize content.
  • Capitalize headings according to the AP Stylebook (use this tool)
  • Include an introduction with at least two paragraphs before the first H2 section.
  • Use appropriate formatting (bold, italic, underline), notes, quotes, TLDRs, and key points.
  • Incorporate code elements and Markdown format where appropriate.
  • Ensure at least one visual element per “screen” of the article (screenshots, diagrams, tables, graphs, lists, sidenotes, blockquotes).

Fact-Checking

  • Verify all facts and data points included in the article.

Asset Management

  • Save images in the /assets folder.
  • Follow naming conventions: YYYYMMDD_title_of_the_article_IMG_NAME_NO.png.
  • (Optional) Create a GitHub repo for the code referenced in the article and share it.
  • (Optional) Include a link to this Loom video in the PR comments.

Interlinking

Glossary/Definitions

  • Create new definition in /defitnitions folder.

Review and Edit

  • Ensure articles address the needs of the target audience and their search intent.
  • Read the article out loud to catch any awkward phrasing.
  • Run the draft through Grammarly or a similar grammar tool.
  • Double-check adherence to the style guide and repository guidelines.
  • Use the name of the article for the title of the PR.

@bellatrick bellatrick changed the title Using Environmental Variables in Daytona Example project to showcase how to use dev env vars in Daytona Nov 26, 2024
@bellatrick
Copy link
Contributor Author

Hey! @mojafa, this PR is ready for review.

@mojafa
Copy link
Collaborator

mojafa commented Nov 29, 2024

@bellatrick I wonder why you didn't check this, yet you have it:

  • (Optional) Create a GitHub repo for the code referenced in the article and share it.

@mojafa
Copy link
Collaborator

mojafa commented Nov 29, 2024

Also see the spelling here:
Screenshot 2024-11-29 at 08 02 46
Screenshot 2024-11-29 at 08 04 01

It's Dev Container

@bellatrick
Copy link
Contributor Author

@bellatrick I wonder why you didn't check this, yet you have it:

  • (Optional) Create a GitHub repo for the code referenced in the article and share it.

I didn't explicitly mention the branch with env_demo.py because I linked to the main branch for readers to pull the initial code. Since the remaining code is just one file with a few lines, I felt it was unnecessary to include a separate branch link at the end of the article.

@bellatrick
Copy link
Contributor Author

Also see the spelling here: Screenshot 2024-11-29 at 08 02 46 Screenshot 2024-11-29 at 08 04 01

It's Dev Container

Oh okay, got it!

@mojafa
Copy link
Collaborator

mojafa commented Dec 4, 2024

@bellatrick I wanted to let you know that I've just pushed some changes to the main branch that fix some linting issues and update the compliance rules. These updates should help you pass the content compliance checks in your current pull request.

When you get a chance, please pull the latest changes from the main branch into your working branch. This should make the integration smoother and help avoid any potential conflicts.

@mojafa
Copy link
Collaborator

mojafa commented Dec 4, 2024

Screenshot 2024-12-05 at 00 15 39 Screenshot 2024-12-05 at 00 15 59

@bellatrick please update the command daytona create --code to daytona create [repo_url] in this case https://github.com/bellatrick/python_starter.git
Like this
Screenshot 2024-12-05 at 00 25 42

code examples work otherwise,
Screenshot 2024-12-05 at 00 25 02

@bellatrick
Copy link
Contributor Author

Screenshot 2024-12-05 at 00 15 39 Screenshot 2024-12-05 at 00 15 59
@bellatrick please update the command daytona create --code to daytona create [repo_url] in this case https://github.com/bellatrick/python_starter.git Like this Screenshot 2024-12-05 at 00 25 42

code examples work otherwise, Screenshot 2024-12-05 at 00 25 02

Alright got it!

@bellatrick
Copy link
Contributor Author

@bellatrick I wanted to let you know that I've just pushed some changes to the main branch that fix some linting issues and update the compliance rules. These updates should help you pass the content compliance checks in your current pull request.

When you get a chance, please pull the latest changes from the main branch into your working branch. This should make the integration smoother and help avoid any potential conflicts.

Thanks! Will do that.


### TL;DR

- **What**: Learn to use `daytona env set` for managing workspace environmental variables
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


## Introduction

[Environmental variables]('/definitions/20241126_definition_environment_variables.md') are important for configuring development environments and storing sensitive information. They provide a flexible way to control application behavior without hardcoding values directly into the source code. Daytona offers a streamlined method for setting, managing, and using environmental variables across various workspaces using the `daytona env` command. This simplifies configuration and enhances security especially when collaborating on projects.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please move the link from the first paragraph somewhere else, especially when it is a first word it will look ugly, thanks @bellatrick


## Introduction

[Environmental variables]('/definitions/20241126_definition_environment_variables.md') are important for configuring development environments and storing sensitive information. They provide a flexible way to control application behavior without hardcoding values directly into the source code. Daytona offers a streamlined method for setting, managing, and using environmental variables across various workspaces using the `daytona env` command. This simplifies configuration and enhances security especially when collaborating on projects.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls split this in two para, second stars: Daytona offers a...

- Create a workspace with `daytona create --code`
- Verify variables with `daytona env list`

## Prerequisites
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add just a short sentence for prereq, e.g. Before starting you need to ... something like that
also link Daytona to github readme
docker also to their install docs
vs code also

daytona server
```

Then use `daytona env set` to define environmental variables:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mention they can use TUI, editor or in a cli like in your example, add one more screenshot of TUI

![Result of running python script](assets/20241126_Using_Environmental_Variables_in_Daytona_2.png)

### Best Practices

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add one small intro sentence to section

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @nkkko
I've made all the suggested changes.

…paragraphs before prerequisites and best practices sections

Signed-off-by: bellatrick <[email protected]>
@nkkko nkkko merged commit b3b1280 into daytonaio:main Dec 21, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants