Skip to content

Commit d8da9ea

Browse files
Apply suggestions from code review
Co-authored-by: Karl Erickson <[email protected]>
1 parent e2ccf60 commit d8da9ea

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ The [Paketo buildpacks samples](https://github.com/paketo-buildpacks/samples/tre
8585

8686
- 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).
8787
- Using NPM 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-
- Define a script under the `scripts` property of the package.json file that builds your production-ready static assets. For React, it's `build`.
89-
- Find out where static assets are stored after the build script runs. For React, static assets are stored in `./build` by default.
90-
- Set `BP_NODE_RUN_SCRIPTS` to the name of the build script.
91-
- Set `BP_WEB_SERVER_ROOT` to the build output directory.
88+
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`.
89+
1. Find out where static assets are stored after the build script runs. For React, static assets are stored in `./build` by default.
90+
1. Set `BP_NODE_RUN_SCRIPTS` to the name of the build script.
91+
1. Set `BP_WEB_SERVER_ROOT` to the build output directory.
9292
- 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).
9393

9494
## Configure an auto-generated server configuration file
@@ -98,7 +98,7 @@ You can use environment variables to modify the auto-generated server configurat
9898
| Environment Variable | Supported Value | Description |
9999
|------------------------------------|----------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
100100
| `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_ROOT` | An absolute file path or a file path relative to `/workspace` | Sets the root directory for the static files. The default is `public`. |
101+
| `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`. |
102102
| `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. |
103103
| `BP_WEB_SERVER_FORCE_HTTPS` | *true* or *false* | Enforces HTTPS for server connections by redirecting all requests to use the HTTPS protocol. |
104104

@@ -116,12 +116,12 @@ You can configure web server by using a customized server configuration file. Yo
116116
|-----------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------|-----------------------------------------------|
117117
| Listening port | Web server must listen on port 8080. The service checks the port on TCP for readiness and whether it's live. You must use the templated variable `PORT` in the configuration file. The appropriate port number is injected when the web server is launched. | `listen {{PORT}}` | `Listen "${PORT}"` |
118118
| Log path | Config log path to the console. | `access_log /dev/stdout`, `error_log stderr` | `ErrorLog /proc/self/fd/2` |
119-
| File path with write permission | Web server is granted write permission to the `/tmp` directory. Configuring the full path requires write permission under the `/tmp` directory. | For example: `client_body_temp_path /tmp/client_body_temp` | |
119+
| File path with write permission | Web server is granted write permission to the */tmp* directory. Configuring the full path requires write permission under the */tmp* directory. | For example: *client_body_temp_path /tmp/client_body_temp* | |
120120
| Maximum accepted body size of client request | Web server is behind the gateway. The maximum accepted body size of the client request is set to 500m in the gateway and the value for web server must be less than 500m. | `client_max_body_size` should be less than 500m. | `LimitRequestBody` should be less than 500m. |
121121

122122
## Buildpack bindings
123123

124-
Deploying static files to Azure Spring Apps Enterprise tier supports the Dynatrace buildpack binding. The htpasswd buildpack binding isn't supported.
124+
Deploying static files to Azure Spring Apps Enterprise tier supports the Dynatrace buildpack binding. The `htpasswd` buildpack binding isn't supported.
125125

126126
For more information, see the [Buildpack bindings](how-to-enterprise-build-service.md#buildpack-bindings) section of [Use Tanzu Build Service](how-to-enterprise-build-service.md).
127127

@@ -137,10 +137,10 @@ The root cause of these errors is that the web server type isn't specified. To r
137137

138138
The following table describes common deployment errors when you deploy static files to Azure Spring Apps Enterprise tier.
139139

140-
| Error Message | Root Cause | Solution |
140+
| Error message | Root cause | Solution |
141141
|--------------------------------------------------------------------------------------|----------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
142-
| *112404: Exit code 0: purposely stopped, please refer to `https://aka.ms/exitcode`* | The web server failed to start. | Validate your server configuration file to see if there's a configuration error. Then check whether your configuration file conforms to the restrictions described in [Using a customized server configuration file](#using-a-customized-server-configuration-file). |
143-
| *mkdir() "/var/client_body_temp" failed (13: Permission denied)* | The web server doesn't have write permission to the specified path. | Configure the path under the directory `/tmp`; for example: `/tmp/client_body_temp`. |
142+
| *112404: Exit code 0: purposely stopped, please refer to `https://aka.ms/exitcode`* | The web server failed to start. | Validate your server configuration file to see if there's a configuration error. Then, check whether your configuration file conforms to the restrictions described in the [Using a customized server configuration file](#using-a-customized-server-configuration-file) section. |
143+
| *mkdir() "/var/client_body_temp" failed (13: Permission denied)* | The web server doesn't have write permission to the specified path. | Configure the path under the directory */tmp*; for example: */tmp/client_body_temp*. |
144144

145145
## Next steps
146146

0 commit comments

Comments
 (0)