Skip to content

Commit

Permalink
Move node tutorial to docs folder
Browse files Browse the repository at this point in the history
  • Loading branch information
schneems committed Apr 29, 2024
1 parent b728c65 commit 91c90c4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<img alt="Heroku Cloud Native Buildpacks Logo" src="./logo.png" width="100%">
</p>

Create a production-ready container image for your application with a [single command](TUTORIAL.md); no Dockerfile required. [Try Heroku Cloud Native Buildpacks today](TUTORIAL.md).
Create a production-ready container image for your application with a [single command](docs/node_tutorial.md); no Dockerfile required. [Try Heroku Cloud Native Buildpacks today](docs/node_tutorial.md).

## What is a Cloud Native Buildpack?

Expand All @@ -13,7 +13,7 @@ Cloud Native Buildpacks (CNBs) are an [open specification for building and runni

### Philosophy

Heroku CNBs are written with the app developer in mind. We want it to be as easy and simple as possible to transform an app into an OCI image. While a Dockerfile is procedural, CNBs are declarative. Give us your application, and we'll give you an image that can run it. Don't believe us? [Try it out today](TUTORIAL.md).
Heroku CNBs are written with the app developer in mind. We want it to be as easy and simple as possible to transform an app into an OCI image. While a Dockerfile is procedural, CNBs are declarative. Give us your application, and we'll give you an image that can run it. Don't believe us? [Try it out today](docs/node_tutorial.md).

We believe:
- Building OCI images shouldn't be a pain.
Expand Down Expand Up @@ -53,7 +53,7 @@ To run our buildpack locally, we will use `pack`, a tool maintained by the Cloud
### Create the app image

> [!NOTE]
> For a full hands-on getting started experience [follow our getting started tutorial](TUTORIAL.md).
> For a full hands-on getting started experience [follow our getting started tutorial](docs/node_tutorial.md).
First, we need an application to produce an image. We will use [Heroku's getting started app for Node.js](https://github.com/heroku/node-js-getting-started), but any other app that uses a supported ecosystem will work. Clone the application:

Expand All @@ -67,7 +67,7 @@ In your application directory, run the `pack build` command. No additional steps
$ pack build my-app-image --builder heroku/builder:22 --path node-js-getting-started
```

Once the image is built, you can run it with the tools you're already comfortable with, like the `docker` CLI, for a demonstration of how [read out getting started tutorial](TUTORIAL.md).
Once the image is built, you can run it with the tools you're already comfortable with, like the `docker` CLI, for a demonstration of how [read out getting started tutorial](docs/node_tutorial.md).

## Discussions

Expand Down
10 changes: 5 additions & 5 deletions TUTORIAL.md → docs/node_tutorial.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Cloud Native Buildpack Tutorial
# Cloud Native Buildpack Tutorial
Build a Node.js application image in 5 minutes, no Dockerfile required.

At the end of this tutorial, you'll have a working [OCI image](https://opencontainers.org/) of a Node.js application that can run locally. You will learn about the Cloud Native Buildpack (CNB) ecosystem, and how to utilize the [pack CLI](https://buildpacks.io/docs/for-platform-operators/how-to/integrate-ci/pack/) to build images without the need to write or maintain a Dockerfile.
Expand Down Expand Up @@ -37,7 +37,7 @@ The current default builder is heroku/builder:22
## What is a builder?

> [!NOTE]
> Skip ahead if you want to build the application first and get into the details later. You won't need to
> Skip ahead if you want to build the application first and get into the details later. You won't need to
> know about builders for the rest of this tutorial.
In short, a builder is a delivery mechanism for buildpacks. A builder contains references to base images and individual buildpacks. A base image contains the operating system and system dependencies. Buildpacks are the components that will configure an image to run your application, that’s where the bulk of the logic lives and why the project is called “Cloud Native Buildpacks” and not “Cloud Native Builders.”
Expand Down Expand Up @@ -78,7 +78,7 @@ This output shows the various buildpacks that represent the different languages

## Download an example Node.js application

How do you configure a CNB? Give them an application. While Dockerfile is procedural, buildpacks, are declarative. A buildpack will determine what your application needs to function by inspecting the code on disk.
How do you configure a CNB? Give them an application. While Dockerfile is procedural, buildpacks, are declarative. A buildpack will determine what your application needs to function by inspecting the code on disk.

For this example, we're using a pre-built Node.js application. Download it now:

Expand All @@ -94,7 +94,7 @@ $ ls
Procfile README.md app.json index.js package-lock.json package.json public test.js views
```

Now build an image named `my-image-name` by executing the `heroku/builder:22` against the application by running the
Now build an image named `my-image-name` by executing the `heroku/builder:22` against the application by running the
`pack build` command:

```
Expand Down Expand Up @@ -399,4 +399,4 @@ This is the Procfile of the Node.js getting started guide:
web: npm start
```

By including this file and using `heroku/procfile` buildpack, your application will receive a default web process that calls `npm start`. You can configure this behavior by changing the contents of that file.
By including this file and using `heroku/procfile` buildpack, your application will receive a default web process that calls `npm start`. You can configure this behavior by changing the contents of that file.

0 comments on commit 91c90c4

Please sign in to comment.