Merge branch 'main' into baileycodespaces-java-quickstart
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
---
|
||||
title: About billing for Codespaces
|
||||
intro: 'When {% data variables.product.prodname_codespaces %} becomes generally available, you will be billed for storage and compute usage.'
|
||||
product: '{% data reusables.gated-features.codespaces %}'
|
||||
versions:
|
||||
free-pro-team: '*'
|
||||
redirect_from:
|
||||
- /github/developing-online-with-codespaces/about-billing-for-codespaces
|
||||
topics:
|
||||
- Codespaces
|
||||
---
|
||||
|
||||
{% data reusables.codespaces.release-stage %}
|
||||
|
||||
{% data reusables.codespaces.about-billing-for-codespaces %}
|
||||
|
||||
Updates on the billing model for Codespaces will be shared in an upcoming announcement.
|
||||
@@ -1,62 +0,0 @@
|
||||
---
|
||||
title: About Codespaces
|
||||
intro: '{% data variables.product.prodname_codespaces %} is an online development environment, hosted by {% data variables.product.prodname_dotcom %} and powered by {% data variables.product.prodname_vscode %}, that allows you to develop entirely in the cloud.'
|
||||
product: '{% data reusables.gated-features.codespaces %}'
|
||||
redirect_from:
|
||||
- /github/developing-online-with-github-codespaces/about-github-codespaces
|
||||
- /github/developing-online-with-codespaces/about-codespaces
|
||||
versions:
|
||||
free-pro-team: '*'
|
||||
topics:
|
||||
- Codespaces
|
||||
---
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** {% data variables.product.prodname_codespaces %} is currently in limited public beta and subject to change. During the beta period, {% data variables.product.prodname_dotcom %} does not make any guarantees about the availability of {% data variables.product.prodname_codespaces %}. For more information about joining the beta, see "[Joining the beta](/github/developing-online-with-codespaces/about-codespaces#joining-the-beta)."
|
||||
|
||||
{% endnote %}
|
||||
|
||||
### About {% data variables.product.prodname_codespaces %}
|
||||
|
||||
{% data variables.product.prodname_codespaces %} is a cloud development environment available in your browser. A codespace includes everything you need to develop for a specific repository, including a text editor with syntax highlighting and autocomplete, a terminal, debugging tools, and Git commands, all within {% data variables.product.prodname_dotcom %}. You can also install {% data variables.product.prodname_vscode %} extensions in your codespace to add more functionality.
|
||||
|
||||
{% data variables.product.prodname_codespaces %} makes it easier for developers to onboard to a new company or start contributing to an open-source project. Project maintainers can configure a repository so that, when you create a codespace for the repository, the project's dependencies are included automatically. You can start coding faster by reducing time spent configuring your environment.
|
||||
|
||||
{% data variables.product.prodname_codespaces %} allows you to develop in the cloud instead of locally. Developers can contribute from anywhere, on any machine, including tablets or Chromebooks, and there is no need to maintain local copies of intellectual property.
|
||||
|
||||

|
||||
|
||||
### Using {% data variables.product.prodname_codespaces %}
|
||||
|
||||
Each developer can create one or more codespace for any public repository, or for any private repository owned by their user account. {% data reusables.codespaces.unsupported-repos %} {% data reusables.codespaces.codespaces-are-personal %}
|
||||
|
||||
{% data reusables.codespaces.codespaces-are-per-branch %} {% data reusables.codespaces.concurrent-codespace-limit %} For more information, see "[Deleting a codespace](/github/developing-online-with-codespaces/deleting-a-codespace)."
|
||||
|
||||
{% data reusables.codespaces.use-visual-studio-features %}
|
||||
|
||||
{% data reusables.codespaces.connect-to-codespace-from-vscode %}
|
||||
|
||||
{% data reusables.codespaces.about-configuration %} For more information, see "[Configuring {% data variables.product.prodname_codespaces %} for your project](/github/developing-online-with-codespaces/configuring-codespaces-for-your-project)."
|
||||
|
||||
{% data reusables.codespaces.about-personalization %} For more information, see "[Personalizing {% data variables.product.prodname_codespaces %} for your account](/github/developing-online-with-codespaces/personalizing-codespaces-for-your-account)."
|
||||
|
||||
You can configure settings to add encrypted secrets, enable GPG verification, and allow codespaces to access other repositories. For more information, see "[Managing encrypted secrets for {% data variables.product.prodname_codespaces %}](/github/developing-online-with-codespaces/managing-encrypted-secrets-for-codespaces)", "[Managing GPG verification for {% data variables.product.prodname_codespaces %}](/github/developing-online-with-codespaces/managing-gpg-verification-for-codespaces)", and "[Managing access and security for {% data variables.product.prodname_codespaces %}](/github/developing-online-with-codespaces/managing-access-and-security-for-codespaces)."
|
||||
|
||||
{% data reusables.codespaces.you-can-see-all-your-codespaces %}
|
||||
|
||||
{% data reusables.codespaces.beta-functionality-limited %}
|
||||
|
||||
### About billing for {% data variables.product.prodname_codespaces %}
|
||||
|
||||
{% data reusables.codespaces.about-billing-for-codespaces %} For more information, see "[About billing for {% data variables.product.prodname_codespaces %}](/github/developing-online-with-codespaces/about-billing-for-codespaces)."
|
||||
|
||||
### Joining the beta
|
||||
|
||||
A limited number of people will be invited to join the beta. To join the waitlist, see [Sign up for Codespaces beta](https://github.com/features/codespaces/signup).
|
||||
|
||||
### Contacting us about {% data variables.product.prodname_codespaces %}
|
||||
|
||||
If you encounter problems using {% data variables.product.prodname_codespaces %}, see "[Troubleshooting your codespace](/github/developing-online-with-codespaces/troubleshooting-your-codespace)."
|
||||
|
||||
If you still need help or have feedback about {% data variables.product.prodname_codespaces %}, use the [Codespaces Feedback](https://github.com/github/feedback/discussions/categories/codespaces-feedback) discussion.
|
||||
@@ -30,23 +30,19 @@ This guide shows you how to set up your JavaScript, Node.js, or TypeScript proje
|
||||
|
||||
When you create a codespace, your project is created on a remote VM that is dedicated to you. By default, the container for your codespace has many languages and runtimes including Node.js, JavaScript, Typescript, nvm, npm, and yarn. It also includes a common set of tools like git, wget, rsync, openssh, and nano.
|
||||
|
||||
You can customize your codespace by adjusting the amount of vCPUs and RAM], [adding dotfiles to personalize your environment](/codespaces/setting-up-your-codespace/personalizing-codespaces-for-your-account), or by modifying the tools and scripts installed.
|
||||
You can customize your codespace by adjusting the amount of vCPUs and RAM, [adding dotfiles to personalize your environment](/codespaces/setting-up-your-codespace/personalizing-codespaces-for-your-account), or by modifying the tools and scripts installed.
|
||||
|
||||
{% data variables.product.prodname_codespaces %} uses a file called `devcontainer.json` to store configurations. On launch {% data variables.product.prodname_codespaces %} uses the file to install any tools, dependencies, or other set up that might be needed for the project. For more information, see "[Configuring Codespaces for your project](/codespaces/setting-up-your-codespace/configuring-codespaces-for-your-project)."
|
||||
|
||||
The next section shows you how to modify your tools by adding a dev container.
|
||||
|
||||
### Step 2: Add a dev container to your codespace from a template
|
||||
|
||||
The default codespaces container will support running Node.js projects like [vscode-remote-try-node](https://github.com/microsoft/vscode-remote-try-node) out of the box. By setting up a custom container you can customize the tools and scripts that run as part of codespace creation and ensure a fully reproducible environment for all {% data variables.product.prodname_codespaces %} users in your repository.
|
||||
|
||||
To set up your project with a custom container, you will need to use a `devcontainer.json` file to define the environment. In {% data variables.product.prodname_codespaces %} you can add this either from a template or you can create your own. For more information on dev containers, see [Configuring your codespace](/codespaces/setting-up-your-codespace/configuring-codespaces-for-your-project).
|
||||
|
||||
This example guides you through adding a `devcontainer.json` file from a template.
|
||||
To set up your project with a custom container, you will need to use a `devcontainer.json` file to define the environment. In {% data variables.product.prodname_codespaces %} you can add this either from a template or you can create your own. For more information on dev containers, see "[Configuring Codespaces for your project](/codespaces/setting-up-your-codespace/configuring-codespaces-for-your-project)".
|
||||
|
||||
1. Access the command palette (`shift command P` / `shift control P`), then start typing "dev container". Click **Codespaces: Add Development Container Configuration Files...**
|
||||

|
||||
3. For this example, click **Node.js**. In practice, you could select any container that’s specific to Node or a combination of tools such as Node and MongoDB.
|
||||
3. For this example, click **Node.js**. If you need additional features you can select any container that’s specific to Node or a combination of tools such as Node and MongoDB.
|
||||

|
||||
4. Click the recommended version of Node.js.
|
||||

|
||||
@@ -96,18 +92,18 @@ The newly added `devcontainer.json` file defines a few properties that are descr
|
||||
}
|
||||
```
|
||||
|
||||
- **Name** - We can name our dev container anything, this is just the default
|
||||
- **Build** - Our build properties
|
||||
- **Dockerfile** - In our build object, Dockerfile is a reference to the Dockerfile in the same folder that was the second file added to our project. This is the reference path.
|
||||
- **Name** - You can name your dev container anything, this is just the default.
|
||||
- **Build** - The build properties.
|
||||
- **dockerfile** - In the build object, dockerfile is a reference to the Dockerfile that was also added from the template.
|
||||
- **Args**
|
||||
- **Variant**: We only have one build argument here which is the node variant we want to use which is passed into our Dockerfile.
|
||||
- **Settings** - These are {% data variables.product.prodname_vscode %} settings we wish to set
|
||||
- **Terminal.integrated.shell.linux** - While bash is the default here, we could use zsh for example by modifying this.
|
||||
- **Variant**: This file only contains one build argument, which is the node variant we want to use that is passed into the Dockerfile.
|
||||
- **Settings** - These are {% data variables.product.prodname_vscode %} settings that you can set.
|
||||
- **Terminal.integrated.shell.linux** - While bash is the default here, you could use other terminal shells by modifying this.
|
||||
- **Extensions** - These are extensions included by default.
|
||||
- **Dbaeumer.vscode-eslint** - ES lint is a great extension for linting, but for JavaScript there are a number of great Marketplace extensions you could also include.
|
||||
- **forwardPorts** - By default we can forward a port, like port 3000, but these will also forward automatically
|
||||
- **postCreateCommand** - If we want to run anything after we land in our codespace that’s not defined in our Dockerfile, like yarn install or npm install, we can do that here
|
||||
- **remoteUser** - We’re running as the node user, but you can optionally set this to root
|
||||
- **forwardPorts** - Any ports listed here will be forwarded automatically.
|
||||
- **postCreateCommand** - If you want to run anything after you land in your codespace that’s not defined in the Dockerfile, you can do that here.
|
||||
- **remoteUser** - By default, you’re running as the vscode user, but you can optionally set this to root.
|
||||
|
||||
##### Dockerfile
|
||||
|
||||
@@ -145,7 +141,7 @@ With your dev container added and a basic understanding of what everything does,
|
||||
"forwardPorts": [4000],
|
||||
```
|
||||
|
||||
For more information on `devcontainer.json` properties, see the [devcontainer.json reference](https://code.visualstudio.com/docs/remote/devcontainerjson-reference) on the Visual Studio Code docs.
|
||||
For more information on `devcontainer.json` properties, see the [devcontainer.json reference](https://code.visualstudio.com/docs/remote/devcontainerjson-reference) in the {% data variables.product.prodname_vscode %} docs.
|
||||
|
||||
3. To rebuild your container, access the command palette (`shift command P` / `shift control P`), then start typing "rebuild". Click **Codespaces: Rebuild Container**.
|
||||
|
||||
@@ -168,27 +164,7 @@ In the previous section, you used the `postCreateCommand` to installing a set of
|
||||
|
||||
### Step 5: Commit your changes
|
||||
|
||||
Once you've made changes to your codespace, either new code or configuration changes, you'll want to commit your changes. Committing changes to your repository ensures that anyone else who creates a codespace from this repository has the same configuration. This also means that any customization you do, such as adding {% data variables.product.prodname_vscode %} extensions, will appear for all users.
|
||||
|
||||
1. In the Activity Bar, click on the **Source Control** view.
|
||||
|
||||

|
||||
|
||||
2. To stage your changes, click **+**.
|
||||
|
||||

|
||||
|
||||
3. Type a commit message and then use `Ctrl+Enter` / `cmd+Enter` to commit the changes.
|
||||
|
||||

|
||||
|
||||
4. To create a PR, click the PR icon.
|
||||
|
||||

|
||||
|
||||
5. Select the branches that you want to merge into, then click **Create**.
|
||||
|
||||

|
||||
{% data reusables.codespaces.committing-link-to-procedure %}
|
||||
|
||||
### Next steps
|
||||
|
||||
|
||||
@@ -199,27 +199,7 @@ In the previous section, you used the `postCreateCommand` to install a set of pa
|
||||
|
||||
### Step 5: Commit your changes
|
||||
|
||||
Once you've made changes to your codespace, either new code or configuration changes, you'll want to commit your changes. Committing changes to your repository ensures that anyone else who creates a codespace from this repository has the same configuration. This also means that any customization you do, such as adding {% data variables.product.prodname_vscode %} extensions, will appear for all users.
|
||||
|
||||
1. In the Activity Bar, click on the **Source Control** view.
|
||||
|
||||

|
||||
|
||||
2. To stage your changes, click **+**.
|
||||
|
||||

|
||||
|
||||
3. Type a commit message and then use `Ctrl+Enter` / `cmd+Enter` to commit the changes.
|
||||
|
||||

|
||||
|
||||
4. To create a PR, click the PR icon.
|
||||
|
||||

|
||||
|
||||
5. Select the branches that you want to merge into, then click **Create**.
|
||||
|
||||

|
||||
{% data reusables.codespaces.committing-link-to-procedure %}
|
||||
|
||||
### Next steps
|
||||
|
||||
|
||||
@@ -5,10 +5,6 @@ versions:
|
||||
free-pro-team: '*'
|
||||
---
|
||||
|
||||
{% link_with_intro /about-codespaces %}
|
||||
|
||||
{% link_with_intro /about-billing-for-codespaces %}
|
||||
|
||||
{% link_with_intro /getting-started-with-your-nodejs-project-in-codespaces %}
|
||||
|
||||
{% link_with_intro /getting-started-with-your-python-project-in-codespaces %}
|
||||
|
||||
Reference in New Issue
Block a user