You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/spring-apps/how-to-enterprise-deploy-static-file.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@ You can also create a server configuration file to customize the web server.
37
37
38
38
### Deploy static files directly
39
39
40
-
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.
41
41
42
42
```azurecli
43
43
az spring app deploy
@@ -48,7 +48,7 @@ az spring app deploy
48
48
--build-env BP_WEB_SERVER=nginx
49
49
```
50
50
51
-
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.
52
52
53
53
### Deploy your front-end application as static content
54
54
@@ -85,20 +85,20 @@ For more information, see the [Using a customized server configuration file](#us
85
85
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:
86
86
87
87
- 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).
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 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:
89
89
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`.
90
90
1. Find out where static assets are stored after the build script runs. For React, static assets are stored in `./build` by default.
91
91
1. Set `BP_NODE_RUN_SCRIPTS` to the name of the build script.
92
92
1. Set `BP_WEB_SERVER_ROOT` to the build output directory.
93
93
- 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).
94
94
95
-
## Configure an auto-generated server configuration file
95
+
## Configure an autogenerated server configuration file
96
96
97
-
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.
98
98
99
99
| Environment Variable | Supported Value | Description |
|`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. |
102
102
|`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`. |
103
103
|`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. |
104
104
|`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