Skip to content

Commit d22ef5d

Browse files
authored
Eric/copy root readme to npm (#1407)
* update make file to sync pkgs/npm/README.md * added quotes * -date pkg/npm/README.md content
1 parent f39a138 commit d22ef5d

File tree

3 files changed

+32
-17
lines changed

3 files changed

+32
-17
lines changed

Makefile

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,21 @@ pre-commit:
1010
@if git diff --cached --name-only | grep -q '^src/'; then make -C src lint; fi
1111

1212
.PHONY: pre-push
13-
pre-push: src/README.md test-nix
13+
pre-push: pkgs/npm/README.md src/README.md test-nix
1414
@make -C src test
1515

1616
.PHONY: setup
1717
setup:
1818
go -C src mod tidy
1919

20-
src/README.md: README.md
21-
@awk '/^## Develop Once, Deploy Anywhere\./{p=1} (/^## /||/^### /){if(p&&!/^## Develop Once, Deploy Anywhere\./){exit}} p' $< > $@
22-
@awk '/^## Defang CLI/{p=1} (/^## /||/^### /){if(p&&!/^## Defang CLI/){exit}} p' $< >> $@
23-
@awk '/^## Getting started/{p=1} (/^## /||/^### /){if(p&&!/^## Getting started/){exit}} p' $< >> $@
24-
@awk '/^## Support/{p=1} (/^## /||/^### /){if(p&&!/^## Support/){exit}} p' $< >> $@
25-
@awk '/^## Environment Variables/{p=1} (/^## /||/^### /){if(p&&!/^## Environment Variables/){exit}} p' $< >> $@
26-
@echo 'src/README.md was updated because root README.md changed. Please add src/README.md to your commit.';
20+
pkgs/npm/README.md src/README.md: README.md
21+
@awk '/^## Develop Once, Deploy Anywhere\./{p=1} (/^## /||/^### /){if(p&&!/^## Develop Once, Deploy Anywhere\./){exit}} p' $< > src/README.md
22+
@awk '/^## Defang CLI/{p=1} (/^## /||/^### /){if(p&&!/^## Defang CLI/){exit}} p' $< >> src/README.md
23+
@awk '/^## Getting started/{p=1} (/^## /||/^### /){if(p&&!/^## Getting started/){exit}} p' $< >> src/README.md
24+
@awk '/^## Support/{p=1} (/^## /||/^### /){if(p&&!/^## Support/){exit}} p' $< >> src/README.md
25+
@awk '/^## Environment Variables/{p=1} (/^## /||/^### /){if(p&&!/^## Environment Variables/){exit}} p' $< >> src/README.md
26+
@cp src/README.md pkgs/npm/README.md
27+
@echo 'README files synced successfully. Please add any changes to your commit.'
2728
@false
2829

2930
.PHONY: test-nix

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ The Defang CLI recognizes the following environment variables:
148148
- `DEFANG_PULUMI_BACKEND` - The Pulumi backend URL or `"pulumi-cloud"`; defaults to a self-hosted backend
149149
- `DEFANG_PULUMI_DIR` - Run Pulumi from this folder, instead of spawning a cloud task; requires `--debug` (BYOC only)
150150
- `DEFANG_PULUMI_VERSION` - Override the version of the Pulumi image to use (`aws` provider only)
151+
- `DEFANG_TENANT` - The name of the tenant to use.
151152
- `NO_COLOR` - If set to any value, disables color output; by default, color output is enabled depending on the terminal
152153
- `PULUMI_ACCESS_TOKEN` - The Pulumi access token to use for authentication to Pulumi Cloud; see `DEFANG_PULUMI_BACKEND`
153154
- `PULUMI_CONFIG_PASSPHRASE` - Passphrase used to generate a unique key for your stack, and configuration and encrypted state values

pkgs/npm/README.md

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# ![Defang](https://raw.githubusercontent.com/DefangLabs/defang-assets/main/Logos/Element_Wordmark_Slogan/JPG/Dark_Colour_Glow.jpg)
1+
## Develop Once, Deploy Anywhere.
22

3-
Develop Anything, Deploy Anywhere. Take your app from Docker Compose to a secure and scalable deployment on your favorite cloud in minutes.
3+
Take your app from Docker Compose to a secure and scalable deployment on your favorite cloud in minutes.
44

5-
- Public releases of the Defang CLI; [click here](https://github.com/DefangLabs/defang/releases/latest/) for the latest version
6-
- Sample projects in Golang, Python, Node.js, and many more languages and frameworks, that show you how to accomplish various tasks and deploy them to the DOP using a Docker Compose file and the Defang CLI.
7-
- Samples that show how to deploy an app using the [Defang Pulumi Provider](https://github.com/DefangLabs/pulumi-defang).
5+
## Defang CLI
6+
7+
The Defang Command-Line Interface [(CLI)](https://docs.defang.io/docs/getting-started) is designed for developers who prefer to manage their workflows directly from the terminal. It offers full access to Defang’s capabilities, allowing you to build, test, and deploy applications efficiently to the cloud.
88

99
## Getting started
1010

@@ -16,27 +16,40 @@ Develop Anything, Deploy Anywhere. Take your app from Docker Compose to a secure
1616

1717
## Support
1818

19-
- File any issues [right here on GitHub](https://github.com/DefangLabs/defang/issues)
19+
- File any issues [here](https://github.com/DefangLabs/defang/issues)
2020

2121
## Environment Variables
2222

2323
The Defang CLI recognizes the following environment variables:
2424

2525
- `COMPOSE_PROJECT_NAME` - The name of the project to use; overrides the name in the `compose.yaml` file
2626
- `DEFANG_ACCESS_TOKEN` - The access token to use for authentication; if not specified, uses token from `defang login`
27+
- `DEFANG_BUILD_CONTEXT_LIMIT` - The maximum size of the build context when building container images; defaults to `100MiB`
2728
- `DEFANG_CD_BUCKET` - The S3 bucket to use for the BYOC CD pipeline; defaults to `defang-cd-bucket-…`
2829
- `DEFANG_CD_IMAGE` - The image to use for the Continuous Deployment (CD) pipeline; defaults to `public.ecr.aws/defang-io/cd:public-beta`
2930
- `DEFANG_DEBUG` - set this to `1` or `true` to enable debug logging
3031
- `DEFANG_DISABLE_ANALYTICS` - If set to `true`, disables sending analytics to Defang; defaults to `false`
32+
- `DEFANG_EDITOR` - The editor to launch after new project generation; defaults to `code` (VS Code)
3133
- `DEFANG_FABRIC` - The address of the Defang Fabric to use; defaults to `fabric-prod1.defang.dev`
34+
- `DEFANG_JSON` - If set to `true`, outputs JSON instead of human-readable output; defaults to `false`
3235
- `DEFANG_HIDE_HINTS` - If set to `true`, hides hints in the CLI output; defaults to `false`
3336
- `DEFANG_HIDE_UPDATE` - If set to `true`, hides the update notification; defaults to `false`
34-
- `DEFANG_PROVIDER` - The name of the cloud provider to use, `auto` (default), `aws`, `digitalocean`, or `defang`
37+
- `DEFANG_ISSUER` - The OAuth2 issuer to use for authentication; defaults to `https://auth.defang.io`
38+
- `DEFANG_MODEL_ID` - The model ID of the LLM to use for the generate/debug AI integration (Pro users only)
39+
- `DEFANG_NO_CACHE` - If set to `true`, disables pull-through caching of container images; defaults to `false`
40+
- `DEFANG_ORG` - The name of the organization to use; defaults to the user's GitHub name
41+
- `DEFANG_PREFIX` - The prefix to use for all BYOC resources; defaults to `Defang`
42+
- `DEFANG_PROVIDER` - The name of the cloud provider to use, `auto` (default), `aws`, `digitalocean`, `gcp`, or `defang`
43+
- `DEFANG_PULUMI_BACKEND` - The Pulumi backend URL or `"pulumi-cloud"`; defaults to a self-hosted backend
44+
- `DEFANG_PULUMI_DIR` - Run Pulumi from this folder, instead of spawning a cloud task; requires `--debug` (BYOC only)
45+
- `DEFANG_PULUMI_VERSION` - Override the version of the Pulumi image to use (`aws` provider only)
3546
- `DEFANG_TENANT` - The name of the tenant to use.
3647
- `NO_COLOR` - If set to any value, disables color output; by default, color output is enabled depending on the terminal
48+
- `PULUMI_ACCESS_TOKEN` - The Pulumi access token to use for authentication to Pulumi Cloud; see `DEFANG_PULUMI_BACKEND`
49+
- `PULUMI_CONFIG_PASSPHRASE` - Passphrase used to generate a unique key for your stack, and configuration and encrypted state values
3750
- `TZ` - The timezone to use for log timestamps: an IANA TZ name like `UTC` or `Europe/Amsterdam`; defaults to `Local`
3851
- `XDG_STATE_HOME` - The directory to use for storing state; defaults to `~/.local/state`
3952

40-
---
53+
Environment variables will be loaded from a `.defangrc` file in the current directory, if it exists. This file follows
54+
the same format as a `.env` file: `KEY=VALUE` pairs on each line, lines starting with `#` are treated as comments and ignored.
4155

42-
Made by [Defang Labs](https://defang.io)

0 commit comments

Comments
 (0)