daytonaio / docs

Official Documentation for Daytona
https://daytona.io/docs
Apache License 2.0
10 stars 11 forks source link

Run command in VS Code doesnt work. #52

Closed ivan-burazin closed 3 months ago

ivan-burazin commented 4 months ago

I suggest ensuring that the following command can be used in both Codespaces and Daytona: yarn run dev --host.

If it is compatible, consider editing the development container configuration to include this command. Here's how you can do it:

Check Compatibility in Codespaces:

Open your Codespaces environment. Run the command yarn run dev --host in the terminal. Verify if the command executes successfully. Check Compatibility in Daytona:

Open your Daytona environment. Run the command yarn run dev --host in the terminal. Verify if the command executes successfully. Edit Development Container Configuration:

If the command works in both environments, update the development container configuration (devcontainer.json)

osslate commented 4 months ago

I can confirm yarn run dev --host works in both Codespsces and Daytona v0.17. Are you requesting to have the command auto-run in the Dev Container, as opposed to the current state where the user manually has to open a terminal in VSCode and execute yarn run dev --host themselves?

That was discussed in a previous PR and @Tpuljak suggested not to, so the user has full control over start/stop.

Tpuljak commented 4 months ago

yarn run dev --host should definitely not be part of the devcontainer commands. That's something that the user should run themselves. That being said, @osslate, what I think @ivan-burazin is referring to is this https://github.com/daytonaio/docs/blob/main/.devcontainer/welcome-message.txt

osslate commented 4 months ago

Ah okay. In terms of implementing that change, we could either:

  1. Change the start/dev scripts in package.json to yarn run dev -- --host
  2. Change the instructions in welcome-message.txt to yarn start -- --host or yarn run dev -- --host

Any preference?

Tpuljak commented 4 months ago

Ah okay. In terms of implementing that change, we could either:

  1. Change the start/dev scripts in package.json to yarn run dev -- --host
  2. Change the instructions in welcome-message.txt to yarn start -- --host or yarn run dev -- --host

Any preference?

Let's change it in package.json