Skip to content

Commit

Permalink
Merge pull request #386 from DefangLabs/lio-github-org
Browse files Browse the repository at this point in the history
rename github links
  • Loading branch information
lionello authored May 16, 2024
2 parents c8dba92 + ae29925 commit f400461
Show file tree
Hide file tree
Showing 111 changed files with 261 additions and 262 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-samples-json.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ jobs:
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.DOCS_ACTION_TRIGGER_TOKEN }}
repository: defang-io/defang-docs
repository: DefangLabs/defang-docs
event-type: sample-update
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ jobs:
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.DOCS_ACTION_TRIGGER_TOKEN }}
repository: defang-io/defang-docs
repository: DefangLabs/defang-docs
event-type: cli-autodoc
client-payload: '{"version": "${{ github.ref_name }}"}'

Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,53 +1,53 @@
[![Go package](https://github.com/defang-io/defang/actions/workflows/go.yml/badge.svg?branch=main)](https://github.com/defang-io/defang/actions/workflows/go.yml)
[![Go package](https://github.com/DefangLabs/defang/actions/workflows/go.yml/badge.svg?branch=main)](https://github.com/DefangLabs/defang/actions/workflows/go.yml)

# Defang

Defang is a radically simpler way for developers to create, deploy, and manage cloud applications.

This repo includes:

- Public releases of the Defang CLI; [click here](https://github.com/defang-io/defang/releases/latest/) for the latest version
- Public releases of the Defang CLI; [click here](https://github.com/DefangLabs/defang/releases/latest/) for the latest version
- Samples in Golang, Python, and Node.js that show how to accomplish various tasks and deploy them to the DOP using a Docker Compose file using the Defang CLI.
- Samples that show how to deploy an app using the [Defang Pulumi Provider](https://github.com/defang-io/pulumi-defang).
- Samples that show how to deploy an app using the [Defang Pulumi Provider](https://github.com/DefangLabs/pulumi-defang).

## Getting started

- Read our [Getting Started](https://docs.defang.io/docs/getting-started) page
- Follow the installation instructions from the [Installing](https://docs.defang.io/docs/getting-started/installing) page
- Take a look at our [Samples folder](https://github.com/defang-io/defang/tree/main/samples) for example projects in various programming languages.
- Take a look at our [Samples folder](https://github.com/DefangLabs/defang/tree/main/samples) for example projects in various programming languages.
- Try the AI integration by running `defang generate`
- Start your new service with `defang compose up`

## Installing

Install the Defang CLI from one of the following sources:

- Using the [Homebrew](https://brew.sh) package manager [defang-io/defang tap](https://github.com/defang-io/homebrew-defang):
- Using the [Homebrew](https://brew.sh) package manager [DefangLabs/defang tap](https://github.com/DefangLabs/homebrew-defang):
```
brew install defang-io/defang/defang
brew install DefangLabs/defang/defang
```
- Using a shell script:
```
. <(curl -Ls https://s.defang.io/install)
```
- Using [Go](https://go.dev):
```
go install github.com/defang-io/defang/src/cmd/cli@latest
go install github.com/DefangLabs/defang/src/cmd/cli@latest
```
- Using the [Nix package manager](https://nixos.org):
- with Nix-Env:
```
nix-env -if https://github.com/defang-io/defang/archive/main.tar.gz
nix-env -if https://github.com/DefangLabs/defang/archive/main.tar.gz
```
- or with Flakes:
```
nix profile install github:defang-io/defang#defang-bin --refresh
nix profile install github:DefangLabs/defang#defang-bin --refresh
```
- Download the [latest binary](https://github.com/defang-io/defang/releases/latest/) of the Defang CLI. For this beta, MacOS users will have to explicitly allow running of downloaded programs in the OS security settings.
- Download the [latest binary](https://github.com/DefangLabs/defang/releases/latest/) of the Defang CLI. For this beta, MacOS users will have to explicitly allow running of downloaded programs in the OS security settings.
## Support
- File any issues [right here on GitHub](https://github.com/defang-io/defang/issues)
- File any issues [right here on GitHub](https://github.com/DefangLabs/defang/issues)
## Command completion
Expand Down
8 changes: 4 additions & 4 deletions pkgs/defang/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ let
};

urlMap = {
x86_64-linux = "https://github.com/defang-io/defang/releases/download/v0.5.16/defang_0.5.16_linux_amd64.tar.gz";
aarch64-linux = "https://github.com/defang-io/defang/releases/download/v0.5.16/defang_0.5.16_linux_arm64.tar.gz";
x86_64-darwin = "https://github.com/defang-io/defang/releases/download/v0.5.16/defang_0.5.16_macOS.zip";
aarch64-darwin = "https://github.com/defang-io/defang/releases/download/v0.5.16/defang_0.5.16_macOS.zip";
x86_64-linux = "https://github.com/DefangLabs/defang/releases/download/v0.5.16/defang_0.5.16_linux_amd64.tar.gz";
aarch64-linux = "https://github.com/DefangLabs/defang/releases/download/v0.5.16/defang_0.5.16_linux_arm64.tar.gz";
x86_64-darwin = "https://github.com/DefangLabs/defang/releases/download/v0.5.16/defang_0.5.16_macOS.zip";
aarch64-darwin = "https://github.com/DefangLabs/defang/releases/download/v0.5.16/defang_0.5.16_macOS.zip";
};
in
stdenvNoCC.mkDerivation {
Expand Down
6 changes: 3 additions & 3 deletions pkgs/npm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
"defang": "./bin/cli.js"
},
"keywords": [],
"homepage": "https://github.com/defang-io/defang#readme",
"homepage": "https://github.com/DefangLabs/defang#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/defang-io/defang.git"
"url": "git+https://github.com/DefangLabs/defang.git"
},
"bugs": {
"url": "https://github.com/defang-io/defang/issues"
"url": "https://github.com/DefangLabs/defang/issues"
},
"scripts": {
"build": "tsc",
Expand Down
2 changes: 1 addition & 1 deletion pkgs/npm/src/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ async function downloadAppArchive(
archiveFilename: string,
outputPath: string
): Promise<string> {
const repo = "defang-io/defang";
const repo = "DefangLabs/defang";
const downloadUrl = `https://github.com/${repo}/releases/download/v${version}/${archiveFilename}`;
const downloadTargetFile = path.join(outputPath, archiveFilename);

Expand Down
2 changes: 1 addition & 1 deletion samples/golang/Web Page and Form Post/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This Go application demonstrates a simple form submission using the standard net
2. A <a href="https://docs.defang.io/docs/concepts/compose">compose file</a> to define and run multi-container Docker applications (this is how Defang identifies services to be deployed). (compose.yaml file)

## Prerequisite
1. Download <a href="https://github.com/defang-io/defang">Defang CLI</a>
1. Download <a href="https://github.com/DefangLabs/defang">Defang CLI</a>
2. If you are using <a href="https://docs.defang.io/docs/concepts/defang-byoc">Defang BYOC</a>, make sure you have properly <a href="https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html">authenticated your AWS account (optional)</a>

## A Step-by-Step Guide
Expand Down
4 changes: 2 additions & 2 deletions samples/golang/go-mongodb-atlas/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ Frontend: Basic HTML and JavaScript are used for the frontend to interact with t
Environment: Designed to run in containerized environments using Docker, which ensures consistency across different development and production environments.

## Prerequisite
1. Download <a href="https://github.com/defang-io/defang">Defang CLI</a>
1. Download <a href="https://github.com/DefangLabs/defang">Defang CLI</a>
2. If you are using <a href="https://docs.defang.io/docs/concepts/defang-byoc">Defang BYOC</a>, make sure you have properly <a href="https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html">authenticated your AWS account</a>
Plus, make sure that you have properly set all environment variables up
3. There is a environment variable named MONGO_URI for the MONGODB connection string, in the compose file, be sure to put your mongodb URI, i.e.
3. There is a environment variable named MONGO_URI for the MONGODB connection string, in the compose file, be sure to put your mongodb URI, i.e.
mongodb+srv://<username>:<pwd>@host

## A Step-by-Step Guide
Expand Down
4 changes: 2 additions & 2 deletions samples/nodejs/Basic Service/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Express Request Inspector
This Node.js application, built with Express.js, is designed to inspect and display detailed information about incoming HTTP requests. It supports all HTTP methods and provides insights into the request path, method, headers, query parameters, and body. Note alongside your project, you should also include a package.json file that includes the relevant metadata such as package dependencies, scripts, project verrsions so that the Dockerfile can install necessary dependencies.
This Node.js application, built with Express.js, is designed to inspect and display detailed information about incoming HTTP requests. It supports all HTTP methods and provides insights into the request path, method, headers, query parameters, and body. Note alongside your project, you should also include a package.json file that includes the relevant metadata such as package dependencies, scripts, project verrsions so that the Dockerfile can install necessary dependencies.



Expand All @@ -8,7 +8,7 @@ This Node.js application, built with Express.js, is designed to inspect and disp
2. A <a href="https://docs.defang.io/docs/concepts/compose">compose file</a> to define and run multi-container Docker applications (this is how Defang identifies services to be deployed).

## Prerequisite
1. Download <a href="https://github.com/defang-io/defang">Defang CLI</a>
1. Download <a href="https://github.com/DefangLabs/defang">Defang CLI</a>
2. If you are using <a href="https://docs.defang.io/docs/concepts/defang-byoc">Defang BYOC</a>, make sure you have properly <a href="https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html">authenticated your AWS account (optional)</a>

## A Step-by-Step Guide
Expand Down
4 changes: 2 additions & 2 deletions samples/nodejs/Web Page and Form Post/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Go Simple Form Submission App
This is a basic Node.js application using the Express framework to demonstrate handling a form submission. The application serves an HTML form where users can input their first name and then greets them personally upon submission. Note alongside your project, you should also include a package.json file that includes the relevant metadata such as package dependencies, scripts, project verrsions so that the Dockerfile can install necessary dependencies.
This is a basic Node.js application using the Express framework to demonstrate handling a form submission. The application serves an HTML form where users can input their first name and then greets them personally upon submission. Note alongside your project, you should also include a package.json file that includes the relevant metadata such as package dependencies, scripts, project verrsions so that the Dockerfile can install necessary dependencies.


## Essential Setup Files
1. A <a href="https://docs.docker.com/develop/develop-images/dockerfile_best-practices/">Dockerfile</a>.
2. A <a href="https://docs.defang.io/docs/concepts/compose">compose file</a> to define and run multi-container Docker applications (this is how Defang identifies services to be deployed).

## Prerequisite
1. Download <a href="https://github.com/defang-io/defang">Defang CLI</a>
1. Download <a href="https://github.com/DefangLabs/defang">Defang CLI</a>
2. If you are using <a href="https://docs.defang.io/docs/concepts/defang-byoc">Defang BYOC</a>, make sure you have properly <a href="https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html">authenticated your AWS account (optional)</a>

## A Step-by-Step Guide
Expand Down
2 changes: 1 addition & 1 deletion samples/nodejs/blogstarter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This template is a starter project developed using Next.js designed to make it e
3. A <a href="https://docs.docker.com/build/building/context/#dockerignore-files">.dockerignore</a> file to comply with the size limit (10MB).

## Prerequisite
1. Download <a href="https://github.com/defang-io/defang">Defang CLI</a>
1. Download <a href="https://github.com/DefangLabs/defang">Defang CLI</a>
2. If you are using <a href="https://docs.defang.io/docs/concepts/defang-byoc">Defang BYOC</a>, make sure you have properly <a href="https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html">authenticated your AWS account</a>
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`.

Expand Down
12 changes: 6 additions & 6 deletions samples/nodejs/blogstarter/_posts/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,28 @@ author:
ogImage:
url: "/assets/blog/guide/cover.jpg"
---
We created this template to help you quickly launch your blogs. This template is built using Markdown and Next.js. We convert Markdown files to HTML string by using `remark` and`remark-html`. You can easily add new blogs or modify existing content (like this paragraph) by simply adding or changing the markdown files. We helped you to build all necessary files for deploying it through Defang. By simply downloading *[Defang](https://github.com/defang-io/defang)* and running `defang login` and `defang compose up` in the command line interface on your local machine, your blog will be available to everyone in the world.
We created this template to help you quickly launch your blogs. This template is built using Markdown and Next.js. We convert Markdown files to HTML string by using `remark` and`remark-html`. You can easily add new blogs or modify existing content (like this paragraph) by simply adding or changing the markdown files. We helped you to build all necessary files for deploying it through Defang. By simply downloading *[Defang](https://github.com/DefangLabs/defang)* and running `defang login` and `defang compose up` in the command line interface on your local machine, your blog will be available to everyone in the world.

Here is a detailed guide:

### How to edit the blog
1. Copy the code from our *[Github Repository](https://github.com/defang-io/defang/tree/main/samples/nodejs)* to your local machine
1. Copy the code from our *[Github Repository](https://github.com/DefangLabs/defang/tree/main/samples/nodejs)* to your local machine
2. In "_posts", there are three existing Markdown files, representing what is currently shown to you in the template. You could replace the content within.
3. If you want to replace the cover image, you have to firstly add your image to the code. Then, find the "coverImage" tag and replace the directory (for example, "/assets/blog/exploration/cover.jpg") to the directory of your image.
4. You may find other tags within the Markdown file:
- Exerpt
The exerpt tag refers to the summary you would see at the main page.
The exerpt tag refers to the summary you would see at the main page.
- Date
The date tag refers to the time the current blog is created. The earliest blog will be placed at the top.
- Author
The author tag refers to the name and the icon you would see beneath the blog title. You could replace them to your designated name and profile icon.
The author tag refers to the name and the icon you would see beneath the blog title. You could replace them to your designated name and profile icon.

### How to quickly deploy it with Defang
1. Download *[Defang](https://github.com/defang-io/defang)*
1. Download *[Defang](https://github.com/DefangLabs/defang)*
2. Type `defang login` in your command line interface
3. Type `defang compose up` and you are good to go!

### Limitations
1. We convert Markdown to HTML before rendering it to your screen. HTML tags within the Markdown file (for example, `<a href></a>`) will not work.
1. We convert Markdown to HTML before rendering it to your screen. HTML tags within the Markdown file (for example, `<a href></a>`) will not work.


2 changes: 1 addition & 1 deletion samples/nodejs/blogstarter/src/app/_components/footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export function Footer() {
Read Documentation
</a>
<a
href={`https://github.com/defang-io/defang`}
href={`https://github.com/DefangLabs/defang`}
className="mx-3 font-bold hover:underline"
>
View on GitHub
Expand Down
2 changes: 1 addition & 1 deletion samples/nodejs/document-starter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This template is a documentation starter project developed using Nextra, designe
3. A <a href="https://docs.docker.com/build/building/context/#dockerignore-files">.dockerignore</a> file to comply with the size limit (10MB).

## Prerequisite
1. Download <a href="https://github.com/defang-io/defang">Defang CLI</a>
1. Download <a href="https://github.com/DefangLabs/defang">Defang CLI</a>
2. If you are using <a href="https://docs.defang.io/docs/concepts/defang-byoc">Defang BYOC</a>, make sure you have properly <a href="https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html">authenticated your AWS account</a>
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`.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Installing

Defang doesn't require installing anything in your cloud, but you will need to install the [open source](https://github.com/defang-io/defang) Defang command line interface (CLI) to interact with your Defang resources and account.
Defang doesn't require installing anything in your cloud, but you will need to install the [open source](https://github.com/DefangLabs/defang) Defang command line interface (CLI) to interact with your Defang resources and account.

We offer a few different ways to install the Defang CLI. You can use Homebrew, a bash script, or download the binary directly.

Expand All @@ -9,7 +9,7 @@ We offer a few different ways to install the Defang CLI. You can use Homebrew, a
You can easily install the Defang CLI using [Homebrew](https://brew.sh/). Just run the following command in your terminal:

```bash
brew install defang-io/defang/defang
brew install DefangLabs/defang/defang
```

## Using a Bash Script
Expand All @@ -24,4 +24,4 @@ The script will try to download the appropriate binary for your operating system

## Direct Download

You can find the latest version of the Defang CLI on the [releases page](https://github.com/defang-io/defang/releases). Just download the appropriate binary for your operating system and architecture, and put it somewhere in your `PATH`.
You can find the latest version of the Defang CLI on the [releases page](https://github.com/DefangLabs/defang/releases). Just download the appropriate binary for your operating system and architecture, and put it somewhere in your `PATH`.
6 changes: 3 additions & 3 deletions samples/nodejs/document-starter/pages/index.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Introduction
Welcome to Defang's document starter with Nextra. You could easily edit and create content by modifying or editing markdown files.
Deploy your work quickly to the world by <a href="https://github.com/defang-io/defang">Defang</a> within 10 minutes.

Welcome to Defang's document starter with Nextra. You could easily edit and create content by modifying or editing markdown files.
Deploy your work quickly to the world by <a href="https://github.com/DefangLabs/defang">Defang</a> within 10 minutes.

## What is Defang?

Expand Down
2 changes: 1 addition & 1 deletion samples/nodejs/nextjs-boilerplate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This template is a boilerplate project developed using Next.js, offering a start
3. A <a href="https://docs.docker.com/build/building/context/#dockerignore-files">.dockerignore</a> file to comply with the size limit (10MB).

## Prerequisite
1. Download <a href="https://github.com/defang-io/defang">Defang CLI</a>
1. Download <a href="https://github.com/DefangLabs/defang">Defang CLI</a>
2. If you are using <a href="https://docs.defang.io/docs/concepts/defang-byoc">Defang BYOC</a>, make sure you have properly <a href="https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html">authenticated your AWS account</a>
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`.

Expand Down
2 changes: 1 addition & 1 deletion samples/nodejs/nextjs-boilerplate/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export default function Home() {
</a>

<a
href="https://github.com/defang-io/defang"
href="https://github.com/DefangLabs/defang"
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
target="_blank"
rel="noopener noreferrer"
Expand Down
Loading

0 comments on commit f400461

Please sign in to comment.