Skip to content

Commit

Permalink
docs: update README
Browse files Browse the repository at this point in the history
  • Loading branch information
fiam committed Sep 30, 2024
1 parent a4a7b6b commit 03b12dc
Showing 1 changed file with 34 additions and 90 deletions.
124 changes: 34 additions & 90 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,123 +1,67 @@
## 🎯 A Template for building Docker Guides' Samples Apps
# Docker Build Cloud Cookbook

1. [Sample README Content](#sample-readme-content)
- [Project Title](#project-title)
- [Project Structure](#project-structure)
- [Setup Instructions](#setup-instructions)
- [Configuration](#configuration)
2. [Backlinks](#backlinks)
3. [Maintenance Schedule](#maintenance-schedule)
4. [License](#license)
5. [Contributing](#contributing)




This page outlines the requirements for code repositories in the `dockersamples` organization. These repositories are meant to support Docker guides(and NOT blogs) at this point.
If you have any questions, please contact `#docs` on the [Docker Community Slack](https://communityinviter.com/apps/dockercommunity/docker-community).

### PLEASE REMOVE THIS SECTION ONCE YOU CLONE THIS REPO

This section provides instructions for using the template. Please remove this "Samples Repo Templates for Docker Guides" section from the README file after cloning the repository to ensure your guide is clean and tailored to your specific application.

### For New Repository


1. Select **Use this template** and choose **Create a new repository**.

<img width="1144" alt="image" src="https://github.com/user-attachments/assets/d27634f1-1f7e-4e77-bc60-25122467e805">

---


2. Select **dockersamples/docker-guides-template** under Repository Template, select your repository, populate description and choose your preferred repository name.

<img width="725" alt="image" src="https://github.com/user-attachments/assets/8fbc6a38-f6ab-4442-b0ad-51ad01794016">

---



3. Select **Create repository**. Don't forget to populate **About** section with a short description of the project once you create the repository.

### For Existing Repository

1. Copy the [workflow file](.github/workflows/existing-repo.yaml) from our template repository
2. Add it to your repository under `.github/workflows/`
3. Trigger the functionality manually via the Actions tab to update the repo
4. Ensure that you select the right branch (main or master) based on the repo while triggering the workflow run.


## Sample README Content

The README.md describes the purpose of the repository, setup instructions, and related resources.

## Project Title

This repo contains the sample application for developing applications and the Docker guide on Docker Docs. While this project is written primarily in Node/Rust/Java, the focus is on launching and using tool in development and the tool-related pieces can easily be adapted into any other language.

Notice: This sample repo is intended to support the guide mentioned above. As such, the application code is purposely kept simple to keep the focus on the guide's content and should not be considered production-ready.
This repository contains a sample application that demonstrates building a simple Rust web server using Docker Build Cloud. This app is part of a Docker guide showcasing how to leverage Docker Build Cloud for building containerized applications.

## Project Structure
[Describe the directory structure of the project repository]

- **app/** - The main "app" of the project. It listens to events on a Kafka topic and logs them.
- **frontend/** - Contains the frontend part of the application.
- **backend/** - Contains the backend part of the application.
- **database/** - Contains database configuration and scripts.
- **src/** - The main application code for the Rust web server.
- **Dockerfile** - Defines how the Rust app is built and containerized using Docker Build Cloud.
- **build-and-run.sh** - A script that builds and runs the application for local development.
- **.dockerignore** - Specifies files to be ignored when building the Docker image.
- **.github/** - Contains GitHub workflows for CI/CD, including Docker Build Cloud integration.

## Setup Instructions
[Provide clear setup instructions here]

Follow these steps to get the project up and running locally:

### 1. Clone the repository
```bash
git clone https://github.com/your-org/sample-repo.git
```

```bash
git clone https://github.com/dockersamples/build-cloud-cookbook.git
```

### 2. Navigate to the project directory:

```bash
cd build-cloud-cookbook
```
cd sample-repo

### 3. Build and run the application

You can use the provided build-and-run.sh script to build and run the application. This script handles the Docker Build Cloud process and starts the web server on the default address `127.0.0.1:3000`.

```bash
./build-and-run.sh
```
The app will be accessible at `http://127.0.0.1:3000`.

## Configuration
This project requires the following environment variables:
- `DATABASE_URL` - The URL of the database.
- `API_KEY` - API key for third-party services.
Create a `.env` file in the root directory to define these variables.

### 3. Install dependencies for the app, frontend, and backend:
This project uses the following environment variable for configuration:

```
cd app && npm install
cd ../frontend && npm install
cd ../backend && npm install
```
`BIND_ADDR` - The address and port on which the web server will bind (default: `127.0.0.1:3000`).
To override the default value, create a .env file at the root of the project:

### 4. Start the application:
Example .env file:

```
npm start
```makefile
BIND_ADDR=0.0.0.0:8080
```

## Backlinks
For more information, check the related [blog post](link) or [use case guide](https://docs.docker.com/guides/use-case/kafka/).

## Maintenance Schedule
This repo is maintained [frequency]. For any security updates, note that there may be delays in applying recent fixes.
For more information on Docker Build Cloud and how this sample app was built, check out the [Docker Build Cloud documentation](https://docs.docker.com/build-cloud/).

## License
This project is licensed under the [Apache 2.0 License](/LICENSE).
## Maintenance Schedule

## Contributing
This repository is maintained quarterly. Security updates and bug fixes are applied as needed, but expect up to a two-week delay for non-critical updates.

Since this project is intended to support a specific use case guide, contributions are limited to bug fixes or security issues. If you have a question, feel free to open an issue!
## License

This project is licensed under the Apache 2.0 License.

## Contributing

Contributions are welcome for bug fixes and security issues. For feature requests or improvements, feel free to open an issue, but note that major changes may not be prioritized as this repository supports a specific Docker guide.


0 comments on commit 03b12dc

Please sign in to comment.