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
|**[Container Bash Script](containers/bash-scheduled-job/README.md)** <br/> A Bash script runnning on a schedule using serverless containers. | Bash |[Serverless Framework]|
72
-
|**[Function Handler Java](containers/function-handler-java/README.md)** <br/> A Java function handler deployed on CaaS. | Java |[Serverless Framework]|
73
-
|**[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]|
74
-
|**[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]|
75
-
|**[Python hello world](containers/python-hello-world/README.md)** <br/> A minimal example running a Flask HTTP server in a serverless container. | Python |[Serverless Framework]|
76
-
|**[Python S3 upload](containers/python-s3-upload/README.md)** <br/> A Python + Flask HTTP server that receives file uploads and writes them to S3. | Python |[Terraform]|
77
-
|**[Terraform NGINX hello world](containers/terraform-nginx-hello-world/README.md)** <br/> A minimal example running the base NGINX image in a serverless container deployed with Terraform. | N/A |[Terraform]|
78
-
|**[Triggers with Terraform](containers/terraform-triggers/README.md)** <br/> Configuring two SQS triggers, used to trigger two containers, one public, one private. | N/A |[Terraform]|
79
-
|**[gRPC HTTP2 in Go](containers/grpc-http2-go/README.md)** <br/> A Go gRPC Container using http2 | Go/Protobuf |[CLI]|
80
-
|**[Rust hello world](containers/rust-hello-world)** <br/> A simple Rust hello world Container | Rust |[CLI]|
81
-
|**[.NET C#](containers/csharp-hello-world)** <br/> A .NET C# Container hello world | C# .NET |[CLI]|
82
-
|**[Ruby Hello World](containers/ruby-hello-world/)** <br/> A simple Ruby Hello world Container | Ruby |[CLI]|
83
-
|**[Deploy Memos app](containers/memos-terraform/)** <br/> A journaling application with its database deployed with Terraform | Terraform |[Terraform]|
84
-
|**[Metabase on VPC](containers/vpc-metabase/README.md)** <br/> A Metabase instance running in a private network with a PostgreSQL database. | N/A |[Terraform]|
|**[Container Bash Script](containers/bash-scheduled-job/README.md)** <br/> A Bash script runnning on a schedule using serverless containers. | Bash |[Serverless Framework]|
72
+
|**[Function Handler Java](containers/function-handler-java/README.md)** <br/> A Java function handler deployed on CaaS. | Java |[Serverless Framework]|
73
+
|**[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]|
74
+
|**[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]|
75
+
|**[Python hello world](containers/python-hello-world/README.md)** <br/> A minimal example running a Flask HTTP server in a serverless container. | Python |[Serverless Framework]|
76
+
|**[Python S3 upload](containers/python-s3-upload/README.md)** <br/> A Python + Flask HTTP server that receives file uploads and writes them to S3. | Python |[Terraform]|
77
+
|**[Terraform NGINX hello world](containers/terraform-nginx-hello-world/README.md)** <br/> A minimal example running the base NGINX image in a serverless container deployed with Terraform. | N/A |[Terraform]|
78
+
|**[Triggers with Terraform](containers/terraform-triggers/README.md)** <br/> Configuring two SQS triggers, used to trigger two containers, one public, one private. | N/A |[Terraform]|
79
+
|**[gRPC HTTP2 in Go](containers/grpc-http2-go/README.md)** <br/> A Go gRPC Container using http2 | Go/Protobuf |[CLI]|
80
+
|**[Rust hello world](containers/rust-hello-world)** <br/> A simple Rust hello world Container | Rust |[CLI]|
81
+
|**[.NET C#](containers/csharp-hello-world)** <br/> A .NET C# Container hello world | C# .NET |[CLI]|
82
+
|**[Ruby Hello World](containers/ruby-hello-world/)** <br/> A simple Ruby Hello world Container | Ruby |[CLI]|
83
+
|**[Deploy Memos app](containers/memos-terraform/)** <br/> A journaling application with its database deployed with Terraform | Terraform |[Terraform]|
84
+
|**[Metabase on VPC](containers/vpc-metabase/README.md)** <br/> A Metabase instance running in a private network with a PostgreSQL database. | N/A |[Terraform]|
85
+
|**[MongoDB® on VPC](containers/vpc-mongodb/README.md)** <br/> A MongoDB® instance running in a private network with a sample application connecting to it. | TypeScript on Deno |[Terraform]|
|**[Serverless Jobs Hello World](jobs/terraform-hello-world/README.md)** <br/> An example of building a container image and running it as a Serverless Job using Terraform. | N/A |[Terraform]-[Console]|
91
92
|**[Serverless MLOps](jobs/ml-ops/README.md)** <br/> An example of running a Serverless Machine Leaning workflow. | Python |[Terraform]-[Console]-[CLI]|
92
93
|**[Auto Snapshot Instances](jobs/instances-snapshot/README.md)** <br/> Use Serverless Jobs to create snapshots of your instances | Go |[Console]|
|**[Manage large message](mnq/large-messages/README.md)** <br/> An example of infrastructure to manage large messages. | PaaS & S3 | Python |[Terraform]|
102
103
|**[Serverless scraping](mnq/serverless-scraping/README.md)** <br/> An example of infrastructure to scrape the hackernews website. | PaaS & RDB | Python |[Terraform]|
103
104
|**[SNS Instances Notification System](mnq/sns-instances-notification-system/README.md)** <br/> An example of infrastructure to use SNS with Instances. | PaaS & Instances | Golang |[Terraform]|
|**[Kong API Gateway](projects/kong-api-gateway/README.md)** <br/> Deploying a Kong Gateway on containers to provide routing to functions. | CaaS & FaaS | Python |[Serverless Framework]|
110
111
|**[Serverless Gateway](https://github.com/scaleway/serverless-gateway)** <br/> Our serverless gateway for functions and containers. | API Gateway | Python |[Python API Framework]|
111
112
|**[Monitoring Glaciers](projects/blogpost-glacier/README.md)** <br/> A project to monitor glaciers and the impact of global warming. | S3 & RDB | Golang |[Serverless Framework]|
# Serverless Containers with Scaleway Managed MongoDB®
2
+
3
+
A simple Deno application demonstrating how to connect to a Scaleway Managed MongoDB® instance using Mongoose. It relies on Scaleway's Private Networks for secure communication.
4
+
5
+
## Deploying
6
+
7
+
### Prerequisites
8
+
9
+
This Terraform pushes a Docker image to a Scaleway Container Registry before deploying the Serverless Container.
10
+
11
+
Make sure to log in to the Scaleway Container Registry beforehand:
12
+
13
+
```bash
14
+
scw registry login
15
+
```
16
+
17
+
### Deploy with Terraform
18
+
19
+
```bash
20
+
terraform init
21
+
terraform apply
22
+
```
23
+
24
+
That's it! You should be able to access the deployed Serverless Container's endpoint from the Scaleway Console.
25
+
26
+
## Using the Application
27
+
28
+
Once deployed, you can interact with the application using HTTP requests.
29
+
30
+
```bash
31
+
CONTAINER_URL="https://your-container-url"
32
+
# Check MongoDB® connection
33
+
curl $CONTAINER_URL/check_connection
34
+
# Add some people
35
+
curl $CONTAINER_URL/person/george
36
+
curl $CONTAINER_URL/person/alice
37
+
# List all people
38
+
curl $CONTAINER_URL/people
39
+
```
40
+
41
+
## Cleaning Up
42
+
43
+
Make sure to destroy the Terraform-managed infrastructure when you're done:
0 commit comments