Skip to content

Commit c38ca4e

Browse files
committed
changed readmes for some non-config samples
1 parent cbda69e commit c38ca4e

File tree

6 files changed

+241
-92
lines changed

6 files changed

+241
-92
lines changed

samples/angular-express/README.md

Lines changed: 42 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,58 @@
22

33
[![1-click-deploy](https://defang.io/deploy-with-defang.png)](https://portal.defang.dev/redirect?url=https%3A%2F%2Fgithub.com%2Fnew%3Ftemplate_name%3Dsample-angular-express-template%26template_owner%3DDefangSamples)
44

5-
This project demonstrates both client-side component rendering and hydration with Angular, as well as server-side rendering with Node.js and Socket.IO for real-time communication. It also includes Docker configurations for easy deployment.
5+
This project demonstrates both client-side component rendering and hydration with Angular, as well as server-side rendering with Node.js and Socket.IO for real-time communication.
66

7-
## NOTE
7+
It showcases how you could deploy a full-stack application with Angular and Node.js using Defang. The Docker setup ensures the app can be easily built and deployed.
88

9-
This sample showcases how you could deploy a full-stack application with Angular and Node.js using Defang. The Docker setup ensures the app can be easily built and deployed.
10-
11-
## Essential Setup Files
9+
## Prerequisites
1210

13-
1. Download [Defang CLI](https://github.com/defang-io/defang)
14-
2. (Optional) If you are using [Defang BYOC](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html) authenticated with your AWS account
11+
1. Download [Defang CLI](https://github.com/DefangLabs/defang)
12+
2. (Optional) If you are using [Defang BYOC](https://docs.defang.io/docs/concepts/defang-byoc) authenticate with your cloud provider account
1513
3. (Optional for local development) [Docker CLI](https://docs.docker.com/engine/install/)
14+
4. Install [Node.js](https://nodejs.org/en/download/package-manager/)
15+
5. Install [Angular CLI](https://angular.io/cli)
1616

17-
## Prerequisites
17+
## Development
18+
For development, we use two local containers, one for the frontend Angular service and one for the backend service in Express. It also uses Caddy as a web server for serving static files.
1819

19-
1. Download [Defang CLI](https://github.com/defang-io/defang)
20-
2. (Optional) If you are using [Defang BYOC](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html) make sure you have properly authenticated your AWS account
21-
3. [Node.js](https://nodejs.org/en/download/package-manager/)
22-
4. [Angular CLI](https://angular.io/cli)
20+
To run the application locally, you can use the following command:
2321

24-
## A Step-by-Step Guide for deployment
22+
```bash
23+
docker compose -f compose.dev.yaml up --build
24+
```
2525

26-
1. Open the terminal and type `defang login`
27-
2. Type `defang compose up` in the CLI
28-
3. Your app should be up and running with Defang in minutes!
26+
## Configuration
2927

30-
## Development
28+
For this sample, you will not need to provide [configuration](https://docs.defang.io/docs/concepts/configuration).
29+
30+
If you wish to provide configuration, see below for an example of setting a configuration for a value named `API_KEY`.
31+
32+
```bash
33+
defang config set API_KEY
34+
```
35+
36+
## Deployment
37+
38+
> [!NOTE]
39+
> Download [Defang CLI](https://github.com/DefangLabs/defang)
40+
41+
### Defang Playground
42+
43+
Deploy your application to the Defang Playground by opening up your terminal and typing:
44+
```bash
45+
defang compose up
46+
```
47+
48+
### BYOC (AWS)
3149

32-
For development, we use two local containers, one for the frontend Angular service and one for the backend service in Express. It also uses Caddy as a web server for serving static files. To run the sample locally after cloning the repository, you can run on Docker by doing:
50+
If you want to deploy to your own cloud account, you can use Defang BYOC:
3351

34-
1. `docker compose -f compose.dev.yaml up --build`
52+
1. [Authenticate your AWS account](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html), and check that you have properly set your environment variables like `AWS_PROFILE`, `AWS_REGION`, `AWS_ACCESS_KEY_ID`, and `AWS_SECRET_ACCESS_KEY`.
53+
2. Run in a terminal that has access to your AWS environment variables:
54+
```bash
55+
defang --provider=aws compose up
56+
```
3557

3658
---
3759

@@ -41,4 +63,4 @@ Short Description: A full-stack application using Angular for the frontend and N
4163

4264
Tags: Angular, Node.js, Socket.IO, TypeScript, JavaScript
4365

44-
Languages: nodejs
66+
Languages: nodejs

samples/csharp-dotnet/README.md

Lines changed: 42 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,64 @@
22

33
[![1-click-deploy](https://defang.io/deploy-with-defang.png)](https://portal.defang.dev/redirect?url=https%3A%2F%2Fgithub.com%2Fnew%3Ftemplate_name%3Dsample-csharp-dotnet-template%26template_owner%3DDefangSamples)
44

5-
This project is a simple task manager application using ASP.NET Core. We show case how to deploy it to both Defang and Docker for both prod and dev environments.
5+
This sample project is a simple task manager application using ASP.NET Core for the backend and JavaScript for client-side component rendering.
66

7-
## NOTE
7+
It showcases how you could deploy a full-stack application with ASP.NET Core and JavaScript using Defang. The Docker setup ensures the app can be easily built and tested during development.
88

9-
This sample showcases how you could deploy a full-stack application with ASP.NET Core and JavaScript using Defang. The Docker setup ensures the app can be easily built and tested during development.
10-
11-
## Essential Setup Files
9+
## Prerequisites
1210

13-
1. Download [Defang CLI](https://github.com/defang-io/defang)
14-
2. (Optional) If you are using [Defang BYOC](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html) authenticated with your AWS account
11+
1. Download [Defang CLI](https://github.com/DefangLabs/defang)
12+
2. (Optional) If you are using [Defang BYOC](https://docs.defang.io/docs/concepts/defang-byoc) authenticate with your cloud provider account
1513
3. (Optional for local development) [Docker CLI](https://docs.docker.com/engine/install/)
14+
4. Install [ASP.NET Core](https://dotnet.microsoft.com/download/dotnet-core)
1615

17-
## Prerequisites
16+
## Development
1817

19-
1. Download [Defang CLI](https://github.com/defang-io/defang)
20-
2. (Optional) If you are using [Defang BYOC](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html) make sure you have properly authenticated your AWS account
21-
3. [ASP.NET Core](https://dotnet.microsoft.com/download/dotnet-core)
18+
For development, we use two local containers, one for the frontend service and one for the backend service in ASP.NET Core. It also uses Caddy as a web server for serving static files.
2219

23-
## A Step-by-Step Guide for deployment
20+
To run the application locally, you can use the following command:
2421

25-
1. Open the terminal and type `defang login`
26-
2. Type `defang compose up` in the CLI
27-
3. Your app should be up and running with Defang in minutes!
22+
```bash
23+
docker compose -f compose.dev.yaml up --build
24+
```
25+
## Configuration
2826

29-
## Development
27+
For this sample, you will not need to provide [configuration](https://docs.defang.io/docs/concepts/configuration).
28+
29+
If you wish to provide configuration, see below for an example of setting a configuration for a value named `API_KEY`.
30+
31+
```bash
32+
defang config set API_KEY
33+
```
34+
35+
## Deployment
36+
37+
> [!NOTE]
38+
> Download [Defang CLI](https://github.com/DefangLabs/defang)
39+
40+
### Defang Playground
41+
42+
Deploy your application to the Defang Playground by opening up your terminal and typing:
43+
```bash
44+
defang compose up
45+
```
46+
47+
### BYOC (AWS)
3048

31-
For development, we use two local containers, one for the frontend service and one for the backend service in ASP.NET Core. It also uses Caddy as a web server for serving static files. To run the sample locally after cloning the repository, you can run on Docker by doing:
49+
If you want to deploy to your own cloud account, you can use Defang BYOC:
3250

33-
`docker compose -f compose.dev.yaml up --build`
51+
1. [Authenticate your AWS account](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html), and check that you have properly set your environment variables like `AWS_PROFILE`, `AWS_REGION`, `AWS_ACCESS_KEY_ID`, and `AWS_SECRET_ACCESS_KEY`.
52+
2. Run in a terminal that has access to your AWS environment variables:
53+
```bash
54+
defang --provider=aws compose up
55+
```
3456

3557
---
3658

3759
Title: C# & ASP.NET Core
3860

39-
Short Description: A task manager using ASP.NET Core containerized with Docker.
61+
Short Description: A simple task manager application using C# and ASP.NET Core.
4062

4163
Tags: ASP.NET Core, JavaScript, C#
4264

43-
Languages: C#
65+
Languages: C#

samples/django/README.md

Lines changed: 42 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,58 @@
22

33
[![1-click-deploy](https://defang.io/deploy-with-defang.png)](https://portal.defang.dev/redirect?url=https%3A%2F%2Fgithub.com%2Fnew%3Ftemplate_name%3Dsample-django-template%26template_owner%3DDefangSamples)
44

5-
This is a simple example of how to run Django on Defang. It is a simple Todo app that uses SQLite as the database.
6-
7-
### NOTE
8-
9-
This sample is a simple Django app that uses SQLite as the database, which will be reset every time you deploy. **It is not production-ready**. For production use cases, you should check out the Django + Postgres sample.
5+
This sample is a simple Django to-do app that uses SQLite as the database, which will be reset every time you deploy. **It is not production-ready**. For production use cases, you should check out the Django + Postgres sample.
106

117
The app includes a management command which is run on startup to create a superuser with the username `admin` and password `admin`. This means you can login to the admin interface at `/admin/` and see the Django admin interface without any additional steps. The `example_app` is already registered and the `Todo` model is already set up to be managed in the admin interface.
128

139
The Dockerfile and compose files are already set up for you and are ready to be deployed. Serving is done using [Gunicorn](https://gunicorn.org/) and uses [WhiteNoise](https://whitenoise.readthedocs.io/en/latest/) for static files. The `CSRF_TRUSTED_ORIGINS` setting is configured to allow the app to run on a `defang.dev` subdomain.
1410

15-
## Essential Setup Files
11+
## Prerequisites
1612

17-
1. A [Dockerfile](https://docs.docker.com/develop/develop-images/dockerfile_best-practices/) to describe the basic image of your applications.
18-
2. A [docker-compose file](https://docs.defang.io/docs/concepts/compose) to define and run multi-container Docker applications.
19-
3. A [.dockerignore](https://docs.docker.com/build/building/context/#dockerignore-files) file to comply with the size limit (10MB).
13+
1. Download [Defang CLI](https://github.com/DefangLabs/defang)
14+
2. (Optional) If you are using [Defang BYOC](https://docs.defang.io/docs/concepts/defang-byoc) authenticate with your cloud provider account
15+
3. (Optional for local development) [Docker CLI](https://docs.docker.com/engine/install/)
2016

21-
## Prerequisite
17+
## Development
2218

23-
1. Download [Defang CLI](https://github.com/DefangLabs/defang)
24-
2. If you are using [Defang BYOC](https://docs.defang.io/docs/concepts/defang-byoc), make sure you have properly [authenticated your AWS account](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html)
25-
Plus, make sure that you have properly set your environment variables like `AWS_PROFILE`, `AWS_REGION`, `AWS_ACCESS_KEY_ID`, and `AWS_SECRET_ACCESS_KEY`.
19+
To run the application locally, you can use the following command:
20+
21+
```bash
22+
docker compose up --build
23+
```
24+
25+
## Configuration
26+
27+
For this sample, you will not need to provide [configuration](https://docs.defang.io/docs/concepts/configuration).
28+
29+
If you wish to provide configuration, see below for an example of setting a configuration for a value named `API_KEY`.
30+
31+
```bash
32+
defang config set API_KEY
33+
```
34+
35+
## Deployment
36+
37+
> [!NOTE]
38+
> Download [Defang CLI](https://github.com/DefangLabs/defang)
39+
40+
### Defang Playground
41+
42+
Deploy your application to the Defang Playground by opening up your terminal and typing:
43+
```bash
44+
defang compose up
45+
```
46+
47+
### BYOC (AWS)
2648

27-
## A Step-by-Step Guide
49+
If you want to deploy to your own cloud account, you can use Defang BYOC:
2850

29-
1. (optional) If you are using Defang BYOC, make sure to update the `CSRF_TRUSTED_ORIGINS` setting in the `settings.py` file to include an appropriate domain.
30-
2. Open the terminal and type `defang login`
31-
3. Type `defang compose up` in the CLI
32-
4. Now your application will be launched
51+
1. [Authenticate your AWS account](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html), and check that you have properly set your environment variables like `AWS_PROFILE`, `AWS_REGION`, `AWS_ACCESS_KEY_ID`, and `AWS_SECRET_ACCESS_KEY`.
52+
2. Make sure to update the `CSRF_TRUSTED_ORIGINS` setting in the `settings.py` file to include an appropriate domain.
53+
3. Run in a terminal that has access to your AWS environment variables:
54+
```bash
55+
defang --provider=aws compose up
56+
```
3357

3458
---
3559

samples/elysia/README.md

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,48 @@ A basic [Elysia](https://elysiajs.com/) app running on [Bun](https://bun.sh/) wi
77
## Prerequisites
88

99
1. Download [Defang CLI](https://github.com/DefangLabs/defang)
10-
2. (Optional) If you are using [Defang BYOC](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html) authenticated with your AWS account
11-
3. (Optional - for local development) [Docker CLI](https://docs.docker.com/engine/install/)
10+
2. (Optional) If you are using [Defang BYOC](https://docs.defang.io/docs/concepts/defang-byoc) authenticate with your cloud provider account
11+
3. (Optional for local development) [Docker CLI](https://docs.docker.com/engine/install/)
1212

13-
## Deploying
13+
## Development
1414

15-
1. Run `defang login` if you are not yet logged in.
16-
2. Run `defang compose up`.
17-
3. Your app will be running within a few minutes.
15+
To run the application locally, you can use the following command:
1816

19-
## Local Development
17+
```bash
18+
docker compose -f compose.dev.yaml up --build
19+
```
2020

21-
1. Run `docker compose -f compose.dev.yaml up --build`
21+
## Configuration
22+
23+
For this sample, you will not need to provide [configuration](https://docs.defang.io/docs/concepts/configuration).
24+
25+
If you wish to provide configuration, see below for an example of setting a configuration for a value named `API_KEY`.
26+
27+
```bash
28+
defang config set API_KEY
29+
```
30+
31+
## Deployment
32+
33+
> [!NOTE]
34+
> Download [Defang CLI](https://github.com/DefangLabs/defang)
35+
36+
### Defang Playground
37+
38+
Deploy your application to the Defang Playground by opening up your terminal and typing:
39+
```bash
40+
defang compose up
41+
```
42+
43+
### BYOC (AWS)
44+
45+
If you want to deploy to your own cloud account, you can use Defang BYOC:
46+
47+
1. [Authenticate your AWS account](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html), and check that you have properly set your environment variables like `AWS_PROFILE`, `AWS_REGION`, `AWS_ACCESS_KEY_ID`, and `AWS_SECRET_ACCESS_KEY`.
48+
2. Run in a terminal that has access to your AWS environment variables:
49+
```bash
50+
defang --provider=aws compose up
51+
```
2252

2353
---
2454

samples/feathersjs/README.md

Lines changed: 36 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,51 @@ This sample project demonstrates how to deploy a FeathersJS application on to AW
66

77
## Prerequisites
88

9-
1. Download [Defang CLI](https://github.com/DefangLabs/defang) (for Defang deployment)
10-
2. (Optional - for local development) [Docker CLI](https://docs.docker.com/engine/install/)
9+
1. Download [Defang CLI](https://github.com/DefangLabs/defang)
10+
2. (Optional) If you are using [Defang BYOC](https://docs.defang.io/docs/concepts/defang-byoc) authenticate with your cloud provider account
11+
3. (Optional for local development) [Docker CLI](https://docs.docker.com/engine/install/)
1112
3. (Optional - for local development) [Node.js](https://nodejs.org/en/download/)
1213

13-
### Local Development
14-
14+
## Development
1515
For development, we use Docker to containerize the FeathersJS application. The Docker Compose configuration is defined in the `compose.dev.yaml` file.
1616

17-
To start the development environment, run:
17+
To run the application locally, you can use the following command:
1818

19-
```sh
19+
```bash
2020
docker compose -f compose.dev.yaml up --build
2121
```
2222

23-
# Deploying
23+
## Configuration
24+
25+
For this sample, you will not need to provide [configuration](https://docs.defang.io/docs/concepts/configuration).
26+
27+
If you wish to provide configuration, see below for an example of setting a configuration for a value named `API_KEY`.
28+
29+
```bash
30+
defang config set API_KEY
31+
```
32+
33+
## Deployment
34+
35+
> [!NOTE]
36+
> Download [Defang CLI](https://github.com/DefangLabs/defang)
37+
38+
### Defang Playground
39+
40+
Deploy your application to the Defang Playground by opening up your terminal and typing:
41+
```bash
42+
defang compose up
43+
```
44+
45+
### BYOC (AWS)
46+
47+
If you want to deploy to your own cloud account, you can use Defang BYOC:
2448

25-
1. Open the terminal and type defang login
26-
2. Type `defang compose up` in the CLI.
27-
3. Your app will be running within a few minutes.
49+
1. [Authenticate your AWS account](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html), and check that you have properly set your environment variables like `AWS_PROFILE`, `AWS_REGION`, `AWS_ACCESS_KEY_ID`, and `AWS_SECRET_ACCESS_KEY`.
50+
2. Run in a terminal that has access to your AWS environment variables:
51+
```bash
52+
defang --provider=aws compose up
53+
```
2854

2955
---
3056

0 commit comments

Comments
 (0)