Skip to content

Commit b53e60f

Browse files
Merge pull request #234241 from KarlErickson/taoxu0903-patch-4
edit "Update how-to-enterprise-deploy-static-file.md #234212"
2 parents 2a3c4d6 + 7d35aa8 commit b53e60f

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

articles/spring-apps/how-to-enterprise-deploy-static-file.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ms.custom: event-tier1-build-2022, devx-track-java
1515
> [!NOTE]
1616
> Azure Spring Apps is the new name for the Azure Spring Cloud service. Although the service has a new name, you'll see the old name in some places for a while as we work to update assets such as screenshots, videos, and diagrams.
1717
18-
**This article applies to:** ❌ Basic/Standard tier ✔️ Enterprise tier
18+
**This article applies to:** ❌ Basic/Standard ✔️ Enterprise
1919

2020
This article shows you how to deploy your static files to Azure Spring Apps Enterprise tier using the Tanzu Web Servers buildpack. This approach is useful if you have applications that are purely for holding static files like HTML, CSS, or front-end applications built with the JavaScript framework of your choice. You can directly deploy these applications with an automatically configured web server (HTTPD and NGINX) to serve those assets.
2121

@@ -24,19 +24,20 @@ This article shows you how to deploy your static files to Azure Spring Apps Ente
2424
- An already provisioned Azure Spring Apps Enterprise tier instance. For more information, see [Quickstart: Build and deploy apps to Azure Spring Apps using the Enterprise tier](quickstart-deploy-apps-enterprise.md).
2525
- One or more applications running in Azure Spring Apps. For more information on creating apps, see [How to Deploy Spring Boot applications from Azure CLI](./how-to-launch-from-source.md).
2626
- [Azure CLI](/cli/azure/install-azure-cli), version 2.45.0 or higher.
27-
- Your static files or dynamic front-end application.
27+
- Your static files or dynamic front-end application - for example, a React app.
2828

2929
## Deploy your static files
3030

3131
You can deploy static files to Azure Spring Apps using NGINX or HTTPD web servers in the following ways:
3232

3333
- You can deploy static files directly. Azure Spring Apps automatically configures the specified web server to serve the static files.
34-
- You can create your front-end application in the JavaScript framework of your choice, and then deploy your dynamic front-end application as static content.
35-
- You can create a server configuration file to customize the web server.
34+
- You can create your front-end application in the JavaScript framework of your choice, and then deploy your dynamic front-end application from source code. Azure Spring Apps builds your app into static content and uses your configured web server to serve the static files.
35+
36+
You can also create a server configuration file to customize the web server.
3637

3738
### Deploy static files directly
3839

39-
Use the following command to deploy static files directly using an auto-generated default server configuration file.
40+
Use the following command to deploy static files directly using an autogenerated default server configuration file.
4041

4142
```azurecli
4243
az spring app deploy
@@ -47,11 +48,11 @@ az spring app deploy
4748
--build-env BP_WEB_SERVER=nginx
4849
```
4950

50-
For more information, see the [Configure an auto-generated server configuration file](#configure-an-auto-generated-server-configuration-file) section of this article.
51+
For more information, see the [Configure an autogenerated server configuration file](#configure-an-autogenerated-server-configuration-file) section of this article.
5152

5253
### Deploy your front-end application as static content
5354

54-
Use the following command to deploy a dynamic front-end application as static content.
55+
Use the following command to deploy a dynamic front-end application from source code.
5556

5657
```azurecli
5758
az spring app deploy
@@ -84,20 +85,20 @@ For more information, see the [Using a customized server configuration file](#us
8485
The [Paketo buildpacks samples](https://github.com/paketo-buildpacks/samples/tree/main/web-servers) demonstrate common use cases for several different application types, including the following use cases:
8586

8687
- Serving static files with a default server configuration file using `BP_WEB_SERVER` to select either [HTTPD](https://github.com/paketo-buildpacks/samples/blob/main/web-servers/no-config-file-sample/HTTPD.md) or [NGINX](https://github.com/paketo-buildpacks/samples/blob/main/web-servers/no-config-file-sample/NGINX.md).
87-
- Using Node Package Manager to build a [React app](https://github.com/paketo-buildpacks/samples/tree/main/web-servers/javascript-frontend-sample) into static files that can be served by a web server. Use the following steps:
88+
- Using Node Package Manager to build a [React app](https://github.com/paketo-buildpacks/samples/tree/main/web-servers/javascript-frontend-sample) into static files that a web server can serve. Use the following steps:
8889
1. Define a script under the `scripts` property of the *package.json* file that builds your production-ready static assets. For React, it's `build`.
8990
1. Find out where static assets are stored after the build script runs. For React, static assets are stored in `./build` by default.
9091
1. Set `BP_NODE_RUN_SCRIPTS` to the name of the build script.
9192
1. Set `BP_WEB_SERVER_ROOT` to the build output directory.
9293
- Serving static files with your own server configuration file, using either [HTTPD](https://github.com/paketo-buildpacks/samples/tree/main/web-servers/httpd-sample) or [NGINX](https://github.com/paketo-buildpacks/samples/tree/main/web-servers/nginx-sample).
9394

94-
## Configure an auto-generated server configuration file
95+
## Configure an autogenerated server configuration file
9596

96-
You can use environment variables to modify the auto-generated server configuration file. The following table shows supported environment variables.
97+
You can use environment variables to modify the autogenerated server configuration file. The following table shows supported environment variables.
9798

9899
| Environment Variable | Supported Value | Description |
99100
|-----------------------------------|----------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|
100-
| `BP_WEB_SERVER` | *nginx* or *httpd* | Specifies the web server type, either *nginx* for Nginx or *httpd* for Apache HTTP server. Required when using the auto-generated server configuration file. |
101+
| `BP_WEB_SERVER` | *nginx* or *httpd* | Specifies the web server type, either *nginx* for Nginx or *httpd* for Apache HTTP server. Required when using the autogenerated server configuration file. |
101102
| `BP_WEB_SERVER_ROOT` | An absolute file path or a file path relative to */workspace*. | Sets the root directory for the static files. The default is `public`. |
102103
| `BP_WEB_SERVER_ENABLE_PUSH_STATE` | *true* or *false* | Enables push state routing for your application. Regardless of the route that is requested, *index.html* is always served. Useful for single-page web applications. |
103104
| `BP_WEB_SERVER_FORCE_HTTPS` | *true* or *false* | Enforces HTTPS for server connections by redirecting all requests to use the HTTPS protocol. |

0 commit comments

Comments
 (0)