docs: update export-assets script usage to include --silent flag for npm

This commit is contained in:
Victor Santos
2025-12-02 15:14:58 -03:00
parent c2d1864240
commit a2195e9b34
2 changed files with 9 additions and 11 deletions
+6 -8
View File
@@ -14,7 +14,7 @@ show_help() {
Export frontend static assets for CDN deployment. Export frontend static assets for CDN deployment.
USAGE: USAGE:
docker run --rm infisical/infisical npm run assets:export [-- OPTIONS] [PATH] docker run --rm infisical/infisical npm run --silent assets:export [-- OPTIONS] [PATH]
OPTIONS: OPTIONS:
--help, -h Show this help message --help, -h Show this help message
@@ -23,17 +23,15 @@ ARGUMENTS:
PATH Directory to export assets to. If not provided, outputs PATH Directory to export assets to. If not provided, outputs
a tar archive to stdout. a tar archive to stdout.
NOTE:
Use --silent flag to suppress npm output when piping to stdout.
EXAMPLES: EXAMPLES:
# Export as tar to local file # Export as tar to local file
docker run --rm infisical/infisical npm run assets:export > assets.tar docker run --rm infisical/infisical npm run --silent assets:export > assets.tar
# Extract to local directory # Extract to local directory
docker run --rm -v $(pwd)/cdn-assets:/output infisical/infisical npm run assets:export /output docker run --rm -v $(pwd)/cdn-assets:/output infisical/infisical npm run --silent assets:export /output
# Pipe directly to S3 (using aws cli on host)
docker run --rm infisical/infisical npm run assets:export | \
tar -xf - -C ./tmp-assets && \
aws s3 sync ./tmp-assets s3://my-bucket/assets
EOF EOF
exit 0 exit 0
+3 -3
View File
@@ -58,7 +58,7 @@ Infisical provides a built-in command to export frontend assets from the Docker
```bash ```bash
# Export as tar archive to stdout # Export as tar archive to stdout
docker run --rm infisical/infisical npm run assets:export > assets.tar docker run --rm infisical/infisical npm run --silent assets:export > assets.tar
# Extract the archive # Extract the archive
tar -xf assets.tar tar -xf assets.tar
@@ -69,7 +69,7 @@ Or export directly to a mounted directory:
```bash ```bash
docker run --rm -v $(pwd)/cdn-assets:/output \ docker run --rm -v $(pwd)/cdn-assets:/output \
infisical/infisical npm run assets:export /output infisical/infisical npm run --silent assets:export /output
``` ```
### What Gets Exported ### What Gets Exported
@@ -93,7 +93,7 @@ The general deployment flow should be:
```bash ```bash
# Example: Export and upload to S3 # Example: Export and upload to S3
docker run --rm infisical/infisical:$VERSION npm run assets:export > assets.tar docker run --rm infisical/infisical:$VERSION npm run --silent assets:export > assets.tar
tar -xf assets.tar tar -xf assets.tar
aws s3 sync assets s3://your-bucket/assets --cache-control "public, max-age=2592000" aws s3 sync assets s3://your-bucket/assets --cache-control "public, max-age=2592000"