Skip to content

Commit 3dbf155

Browse files
authored
feat(containers): add NGINX hello world example (#48)
* Add NGINX example * Add link to main README * More README detail * Add note on extending NGINX image
1 parent 57dc57d commit 3dbf155

File tree

6 files changed

+3098
-1
lines changed

6 files changed

+3098
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ Table of Contents:
5959
|----------------------------------------------------------------------------------------------------------------------------------------------|--------------|------------------------|
6060
| **[Container Bash Script](containers/bash-scheduled-job/README.md)** <br/> A Bash script runnning on a schedule using serverless containers. | Bash | [Serverless Framework] |
6161
| **[Function Handler Java](containers/function-handler-java/README.md)** <br/> A Java function handler deployed on CaaS. | Java | [Serverless Framework] |
62-
| **[Nginx CORS Private](containers/nginx-cors-private-python/README.md)** <br/> A Nginx proxy to allow CORS requests to a private container. | Python Flask | [Terraform] |
62+
| **[NGINX CORS Private](containers/nginx-cors-private-python/README.md)** <br/> An NGINX proxy to allow CORS requests to a private container. | Python Flask | [Terraform] |
63+
| **[NGINX hello world](containers/nginx-hello-world/README.md)** <br/> A minimal example running the base NGINX image in a serverless container. | N/A | [Serverless Framework] |
6364

6465
### 💜 Projects
6566

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# NGINX hello world
2+
3+
This demonstrates a simple example of running the [NGINX base image](https://hub.docker.com/_/nginx/) on [Scaleway Serverless Containers](https://www.scaleway.com/en/serverless-containers/).
4+
5+
## Requirements
6+
7+
This example assumes you are familiar with how serverless containers work. If needed, you can
8+
check the [Scaleway official documentation](https://www.scaleway.com/en/docs/serverless/containers/quickstart/).
9+
10+
This example uses the Scaleway Serverless Framework Plugin. Please set up your environment with the requirements stated in the [Scaleway Serverless Framework Plugin](https://github.com/scaleway/serverless-scaleway-functions) before trying out the example.
11+
12+
## Deployment
13+
14+
Once your environment is set up, you can deploy your container with:
15+
16+
```sh
17+
npm install
18+
19+
serverless deploy
20+
```
21+
22+
When the deployment is complete, you should be able to `curl` the container's endpoint or hit it from a browser and see the NGINX default page.
23+
24+
## Customising your deployment
25+
26+
To serve custom resource from your NGINX container, you will need to:
27+
28+
- Build a custom image containing these files
29+
- Push this image to a publicly accessible repo, or a private Scaleway container repo
30+
- Update the `registryImage` field in the `serverless.yml` file to point to your image, and redeploy

0 commit comments

Comments
 (0)