Skip to content

Commit d56acdb

Browse files
committed
Update readme
1 parent 38efbb2 commit d56acdb

File tree

5 files changed

+35
-82
lines changed

5 files changed

+35
-82
lines changed

samples/django-railpack/README.md

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,21 @@
1-
# Django
1+
# Django-Railpack
22

33
[![1-click-deploy](https://raw.githubusercontent.com/DefangLabs/defang-assets/main/Logos/Buttons/SVG/deploy-with-defang.svg)](https://portal.defang.dev/redirect?url=https%3A%2F%2Fgithub.com%2Fnew%3Ftemplate_name%3Dsample-django-template%26template_owner%3DDefangSamples)
44

55
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.
66

77
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.
88

9-
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.
9+
The compose files are already set up for you and are ready to be deployed and the image is built by [Railpack](https://railpack.com/). 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.
1010

1111
## Prerequisites
1212

1313
1. Download [Defang CLI](https://github.com/DefangLabs/defang)
1414
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/)
16-
17-
## Development
18-
19-
To run the application locally, you can use the following command:
20-
21-
```bash
22-
docker compose up --build
23-
```
2415

2516
## Configuration
2617

27-
For this sample, you will not need to provide [configuration](https://docs.defang.io/docs/concepts/configuration).
18+
For this sample, you will not need to provide [configuration](https://docs.defang.io/docs/concepts/configuration).
2819

2920
If you wish to provide configuration, see below for an example of setting a configuration for a value named `API_KEY`.
3021

@@ -40,6 +31,7 @@ defang config set API_KEY
4031
### Defang Playground
4132

4233
Deploy your application to the Defang Playground by opening up your terminal and typing:
34+
4335
```bash
4436
defang compose up
4537
```
@@ -51,16 +43,16 @@ If you want to deploy to your own cloud account, you can use Defang BYOC:
5143
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`.
5244
2. Make sure to update the `CSRF_TRUSTED_ORIGINS` setting in the `settings.py` file to include an appropriate domain.
5345
3. Run in a terminal that has access to your AWS environment variables:
54-
```bash
55-
defang --provider=aws compose up
56-
```
46+
```bash
47+
defang --provider=aws compose up
48+
```
5749

5850
---
5951

6052
Title: Django
6153

6254
Short Description: A simple Django app that uses SQLite as the database.
6355

64-
Tags: Django, SQLite, Python
56+
Tags: Django, SQLite, Python, Railpack
6557

6658
Languages: python

samples/flask-railpack/README.md

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,19 @@
1-
# Flask
1+
# Flask-Railpack
22

33
[![1-click-deploy](https://raw.githubusercontent.com/DefangLabs/defang-assets/main/Logos/Buttons/SVG/deploy-with-defang.svg)](https://portal.defang.dev/redirect?url=https%3A%2F%2Fgithub.com%2Fnew%3Ftemplate_name%3Dsample-flask-template%26template_owner%3DDefangSamples)
44

5-
This is a basic Flask to-do app that can be deployed with Defang. Note that alongside your `.py` file, include a `requirements.txt` so that the Dockerfile can install the necessary packages with pip.
5+
This is a basic Flask to-do app that can be deployed with Defang. Note that alongside your `.py` file, include a `requirements.txt` so that the [Railpack](https://railpack.com/) can install the necessary packages with pip.
66

77
This project is intended to provide a basic understanding of how to get started with Flask on Defang. The items are stored in memory and are lost when the server is restarted. **It is not intended for production use**. If you need something production ready, you should use a managed database like Postgres or MySQL.
88

99
## Prerequisites
1010

1111
1. Download [Defang CLI](https://github.com/DefangLabs/defang)
1212
2. (Optional) If you are using [Defang BYOC](https://docs.defang.io/docs/concepts/defang-byoc) authenticate with your cloud provider account
13-
3. (Optional for local development) [Docker CLI](https://docs.docker.com/engine/install/)
14-
15-
## Development
16-
17-
To run the application locally, you can use the following command:
18-
19-
```bash
20-
docker compose up --build
21-
```
2213

2314
## Configuration
2415

25-
For this sample, you will not need to provide [configuration](https://docs.defang.io/docs/concepts/configuration).
16+
For this sample, you will not need to provide [configuration](https://docs.defang.io/docs/concepts/configuration).
2617

2718
If you wish to provide configuration, see below for an example of setting a configuration for a value named `API_KEY`.
2819

@@ -38,6 +29,7 @@ defang config set API_KEY
3829
### Defang Playground
3930

4031
Deploy your application to the Defang Playground by opening up your terminal and typing:
32+
4133
```bash
4234
defang compose up
4335
```
@@ -48,16 +40,16 @@ If you want to deploy to your own cloud account, you can use Defang BYOC:
4840

4941
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`.
5042
2. Run in a terminal that has access to your AWS environment variables:
51-
```bash
52-
defang --provider=aws compose up
53-
```
43+
```bash
44+
defang --provider=aws compose up
45+
```
5446

5547
---
5648

5749
Title: Flask
5850

5951
Short Description: A basic Flask to-do app.
6052

61-
Tags: Flask, Python
53+
Tags: Flask, Python, Railpack
6254

6355
Languages: python
Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Go HTTP Form
1+
# Golang-Http-Form-Railpack
22

33
[![1-click-deploy](https://raw.githubusercontent.com/DefangLabs/defang-assets/main/Logos/Buttons/SVG/deploy-with-defang.svg)](https://portal.defang.dev/redirect?url=https%3A%2F%2Fgithub.com%2Fnew%3Ftemplate_name%3Dsample-golang-http-form-template%26template_owner%3DDefangSamples)
44

@@ -8,19 +8,10 @@ This Go application demonstrates a simple form submission using the standard net
88

99
1. Download [Defang CLI](https://github.com/DefangLabs/defang)
1010
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/)
12-
13-
## Development
14-
15-
To run the application locally, you can use the following command:
16-
17-
```bash
18-
docker compose up --build
19-
```
2011

2112
## Configuration
2213

23-
For this sample, you will not need to provide [configuration](https://docs.defang.io/docs/concepts/configuration).
14+
For this sample, you will not need to provide [configuration](https://docs.defang.io/docs/concepts/configuration).
2415

2516
If you wish to provide configuration, see below for an example of setting a configuration for a value named `API_KEY`.
2617

@@ -36,6 +27,7 @@ defang config set API_KEY
3627
### Defang Playground
3728

3829
Deploy your application to the Defang Playground by opening up your terminal and typing:
30+
3931
```bash
4032
defang compose up
4133
```
@@ -46,16 +38,16 @@ If you want to deploy to your own cloud account, you can use Defang BYOC:
4638

4739
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`.
4840
2. Run in a terminal that has access to your AWS environment variables:
49-
```bash
50-
defang --provider=aws compose up
51-
```
41+
```bash
42+
defang --provider=aws compose up
43+
```
5244

5345
---
5446

5547
Title: Go HTTP Form
5648

5749
Short Description: A simple Go application that demonstrates form submission using the net/http library.
5850

59-
Tags: Go, HTTP
51+
Tags: Go, HTTP, Railpack
6052

6153
Languages: golang

samples/nextjs-railpack/README.md

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Next.js
1+
# Next.js-Railpack
22

33
[![1-click-deploy](https://raw.githubusercontent.com/DefangLabs/defang-assets/main/Logos/Buttons/SVG/deploy-with-defang.svg)](https://portal.defang.dev/redirect?url=https%3A%2F%2Fgithub.com%2Fnew%3Ftemplate_name%3Dsample-nextjs-template%26template_owner%3DDefangSamples)
44

5-
A basic Next.js app with a Dockerfile and compose.yaml ready to deploy to AWS with [Defang](https://defang.io).
5+
A simple Next.js app with a compose.yaml, ready to deploy to AWS using [Defang](https://defang.io). The container image is automatically built by [Railpack](https://railpack.com/).
66

77
## Steps
88

@@ -11,29 +11,12 @@ A basic Next.js app with a Dockerfile and compose.yaml ready to deploy to AWS wi
1111
3. (optional) [Authenticate with AWS](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html)
1212
4. Run `defang compose up` in the root of this project
1313

14-
## Static Files (Experimental)
15-
16-
This example supports deployment to AWS as a static site. Static files will be copied to an S3 bucket. In the _affordable_
17-
deployment mode (the default), the static files will be served over HTTP from an S3 bucket.
18-
19-
:::info
20-
Note that some top-level domains (TLDs), such as `.app`, require HSTS, which will disallow browsers from accessing the site over HTTP. If you want to use such a TLD, you must serve the static files over HTTPS by using either the _balanced_ or _high_availability_ deployment mode.
21-
:::
22-
23-
To serve the static files over HTTPS, use either the _balanced_ or _high_availability_ deployment mode, which will create a CloudFront distribution in front of the S3 bucket.
24-
25-
To deploy this project as a static site, run:
26-
27-
```bash
28-
defang compose up -f compose.static.yaml --provider=aws --mode=balanced
29-
```
30-
3114
---
3215

3316
Title: Next.js
3417

3518
Short Description: A basic Next.js app.
3619

37-
Tags: Next.js, React, Docker, Node.js, TypeScript, JavaScript, Static
20+
Tags: Next.js, React, Node.js, TypeScript, JavaScript, Static, Railpack
3821

3922
Languages: nodejs
Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
# React
1+
# React-Vite-Railpack
22

33
[![1-click-deploy](https://raw.githubusercontent.com/DefangLabs/defang-assets/main/Logos/Buttons/SVG/deploy-with-defang.svg)](https://portal.defang.dev/redirect?url=https%3A%2F%2Fgithub.com%2Fnew%3Ftemplate_name%3Dsample-react-template%26template_owner%3DDefangSamples)
44

5-
This sample shows how to get a simple React app up and running with Defang.
6-
It includes Vite and ESLint, which are common build tools for React development.
5+
This sample shows how to get a simple React app up and running with Defang.
6+
It includes Vite and ESLint, which are common build tools for React development. The container image is automatically built by [Railpack](https://railpack.com/).
77

88
## Prerequisites
99

1010
1. Download [Defang CLI](https://github.com/DefangLabs/defang)
1111
2. (Optional) If you are using [Defang BYOC](https://docs.defang.io/docs/concepts/defang-byoc) authenticate with your cloud provider account
12-
3. (Optional for local development) [Docker CLI](https://docs.docker.com/engine/install/)
1312

1413
## Development
1514

@@ -20,12 +19,6 @@ npm install
2019
npm run dev
2120
```
2221

23-
To run it using a Docker container, you can use the following command:
24-
25-
```bash
26-
docker compose up --build
27-
```
28-
2922
## Deployment
3023

3124
> [!NOTE]
@@ -34,6 +27,7 @@ docker compose up --build
3427
### Defang Playground
3528

3629
Deploy your application to the Defang Playground by opening up your terminal and typing:
30+
3731
```bash
3832
defang compose up
3933
```
@@ -44,16 +38,16 @@ If you want to deploy to your own cloud account, you can use Defang BYOC:
4438

4539
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`.
4640
2. Run in a terminal that has access to your AWS environment variables:
47-
```bash
48-
defang --provider=aws compose up
49-
```
41+
```bash
42+
defang --provider=aws compose up
43+
```
5044

5145
---
5246

5347
Title: React
5448

55-
Short Description: A minimal React app running on Defang.
49+
Short Description: A minimal React app running on Defang.
5650

57-
Tags: React, Vite, JavaScript, Frontend
51+
Tags: React, Vite, JavaScript, Frontend, Railpack
5852

5953
Languages: JavaScript

0 commit comments

Comments
 (0)