From 761c8ffc5eacf0a40d0088e70fb2ac12fd07b596 Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Wed, 1 Oct 2025 12:20:17 +0200 Subject: [PATCH 01/16] feat(srv): add doc on how to deploy website MTA-6545 --- .../index.mdx | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 tutorials/hosting-websites-webapps-serverless-containers/index.mdx diff --git a/tutorials/hosting-websites-webapps-serverless-containers/index.mdx b/tutorials/hosting-websites-webapps-serverless-containers/index.mdx new file mode 100644 index 0000000000..868fb4fb1f --- /dev/null +++ b/tutorials/hosting-websites-webapps-serverless-containers/index.mdx @@ -0,0 +1,78 @@ +--- +title: Hosting websites and web apps with Serverless Containers +description: This page provides guidelines on how to host and deploy a website or a web app using Scaleway Serverless Containers +tags: deploy host website webapp next ruby node html static api containerize application docker dockerfile +dates: + validation: 2025-10-01 + posted: 2025-10-01 +--- + +import Requirements from '@macros/iam/requirements.mdx' + + + + +- A Scaleway account logged into the [console](https://console.scaleway.com) +- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization +- Installed [Docker](https://docs.docker.com/get-started/get-docker/) or [Docker Egine](https://docs.docker.com/engine/install/) +- [Created a Scaleway Container Registry namespace](/container-registry/how-to/create-namespace/) and [logged into it](/container-registry/how-to/connect-docker-cli/) + + +## Create and host a simple HTML static page + +To host a static HTML page on Serverless Containers, you first need to create a simple HTML page that will serve as your website. Next, you will write a Dockerfile to containerize your application, specifying how your HTML file should be served. You will then build the container image locally, and push it to the [Scaleway Container Registry](/container-registry/), before deploying it to [Scaleway Serverless Containers](/serverless-containers/). + +1. In a terminal, run the command below to create a new folder and access it: + + ```sh + mkdir my-static-website + cd my-static-website + ``` + +2. Create a new `index.html` file and add the example code below to it: + + ```html + + + + + Simple HTML Page + + +

Hello World

+

This is a simple paragraph.

+ + + ``` + +3. In the same folder, create a new `dockerfile` file and add the following code to it: + + ```dockerfile + FROM nginx:alpine + COPY ./my-website /usr/share/nginx/html + EXPOSE 80 + ``` + +4. Run the command below to build, tag, and push your image to the Scaleway Container registry: + + ```sh + docker build --platform linux/amd64 \ + --push \ + -t /my-static-website:latest . + ``` + + + You can find your Container Registry endpoint in the **Settings** tab of your Container Registry Endpoint in the [Scaleway console](https://console.scaleway.com/registry/namespaces) + + +5. [Deploy a Serverless Container](/serverless-containers/how-to/deploy-container/) with the following parameters: + + - **Registry**: Scaleway Container Registry + - **Registry namespace**: the Container Registry namespace you pushed your image to. + - **Container port**: `8O` as it is the [port](/serverless-containers/reference-content/port-parameter-variable/) exposed in the dockerfile. + - **Resources**: `100 mVCPU` and `256 MB` memory + - **Autoscaling**: according to your needs. Refer to the [autoscaling documentation](/serverless-containers/reference-content/containers-autoscaling/) for more information. + + The deployment of your container can take up to a minute to complete. + +6. Once your container is **ready**, click the **container endpoint** from its **Overview** tab. Your web page displays, and is available to anyone with the link. \ No newline at end of file From 228ed4052c9aeaa09f575a992418effedbfd4774 Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Wed, 1 Oct 2025 14:23:19 +0200 Subject: [PATCH 02/16] feat(srv): update --- .../index.mdx | 73 ++++++++++--------- 1 file changed, 37 insertions(+), 36 deletions(-) diff --git a/tutorials/hosting-websites-webapps-serverless-containers/index.mdx b/tutorials/hosting-websites-webapps-serverless-containers/index.mdx index 868fb4fb1f..9d2f6b9db3 100644 --- a/tutorials/hosting-websites-webapps-serverless-containers/index.mdx +++ b/tutorials/hosting-websites-webapps-serverless-containers/index.mdx @@ -24,55 +24,56 @@ To host a static HTML page on Serverless Containers, you first need to create a 1. In a terminal, run the command below to create a new folder and access it: - ```sh - mkdir my-static-website - cd my-static-website - ``` + ```bash + mkdir my-static-website + cd my-static-website + ``` 2. Create a new `index.html` file and add the example code below to it: - ```html - - - - - Simple HTML Page - - -

Hello World

-

This is a simple paragraph.

- - - ``` + ```html + + + + + Simple HTML Page + + +

Hello World

+

This is a simple paragraph.

+ + + ``` 3. In the same folder, create a new `dockerfile` file and add the following code to it: - ```dockerfile - FROM nginx:alpine - COPY ./my-website /usr/share/nginx/html - EXPOSE 80 - ``` + ```dockerfile + FROM nginx:alpine + COPY ./my-website /usr/share/nginx/html + EXPOSE 80 + ``` 4. Run the command below to build, tag, and push your image to the Scaleway Container registry: - ```sh - docker build --platform linux/amd64 \ - --push \ - -t /my-static-website:latest . - ``` + ```bash + docker build \ + --platform linux/amd64 \ + --push \ + -t /my-static-website:latest . + ``` - - You can find your Container Registry endpoint in the **Settings** tab of your Container Registry Endpoint in the [Scaleway console](https://console.scaleway.com/registry/namespaces) - + + You can find your Container Registry endpoint in the **Settings** tab of your Container Registry Endpoint in the [Scaleway console](https://console.scaleway.com/registry/namespaces) + 5. [Deploy a Serverless Container](/serverless-containers/how-to/deploy-container/) with the following parameters: - - **Registry**: Scaleway Container Registry - - **Registry namespace**: the Container Registry namespace you pushed your image to. - - **Container port**: `8O` as it is the [port](/serverless-containers/reference-content/port-parameter-variable/) exposed in the dockerfile. - - **Resources**: `100 mVCPU` and `256 MB` memory - - **Autoscaling**: according to your needs. Refer to the [autoscaling documentation](/serverless-containers/reference-content/containers-autoscaling/) for more information. + - **Registry**: Scaleway Container Registry + - **Registry namespace**: the Container Registry namespace you pushed your image to. + - **Container port**: `8O` as it is the [port](/serverless-containers/reference-content/port-parameter-variable/) exposed in the dockerfile. + - **Resources**: `100 mVCPU` and `256 MB` memory + - **Autoscaling**: according to your needs. Refer to the [autoscaling documentation](/serverless-containers/reference-content/containers-autoscaling/) for more information. - The deployment of your container can take up to a minute to complete. + The deployment of your container can take up to a minute to complete. 6. Once your container is **ready**, click the **container endpoint** from its **Overview** tab. Your web page displays, and is available to anyone with the link. \ No newline at end of file From 6e8c9bb66d82c2e098074180dcc8fd96a504be2c Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Wed, 1 Oct 2025 14:41:43 +0200 Subject: [PATCH 03/16] feat(srv): update --- .../hosting-websites-webapps-serverless-containers/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/hosting-websites-webapps-serverless-containers/index.mdx b/tutorials/hosting-websites-webapps-serverless-containers/index.mdx index 9d2f6b9db3..bb3e47386e 100644 --- a/tutorials/hosting-websites-webapps-serverless-containers/index.mdx +++ b/tutorials/hosting-websites-webapps-serverless-containers/index.mdx @@ -72,7 +72,7 @@ To host a static HTML page on Serverless Containers, you first need to create a - **Registry namespace**: the Container Registry namespace you pushed your image to. - **Container port**: `8O` as it is the [port](/serverless-containers/reference-content/port-parameter-variable/) exposed in the dockerfile. - **Resources**: `100 mVCPU` and `256 MB` memory - - **Autoscaling**: according to your needs. Refer to the [autoscaling documentation](/serverless-containers/reference-content/containers-autoscaling/) for more information. + - **Autoscaling**: set a minimum scale of `1` to avoid [cold starts](/serverless-containers/concepts/#cold-start) (optional). The deployment of your container can take up to a minute to complete. From bb1302fc945475dc24ec2eac2e0054c7164eeb84 Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Mon, 6 Oct 2025 14:39:14 +0200 Subject: [PATCH 04/16] feat(srv): update --- .../index.mdx | 34 ++++++++++++++----- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/tutorials/hosting-websites-webapps-serverless-containers/index.mdx b/tutorials/hosting-websites-webapps-serverless-containers/index.mdx index bb3e47386e..c86e6366d2 100644 --- a/tutorials/hosting-websites-webapps-serverless-containers/index.mdx +++ b/tutorials/hosting-websites-webapps-serverless-containers/index.mdx @@ -1,10 +1,21 @@ --- -title: Hosting websites and web apps with Serverless Containers -description: This page provides guidelines on how to host and deploy a website or a web app using Scaleway Serverless Containers -tags: deploy host website webapp next ruby node html static api containerize application docker dockerfile -dates: - validation: 2025-10-01 - posted: 2025-10-01 +title: Hosting a static website with Serverless Containers +description: This page provides guidelines on how to host and deploy a static website using Scaleway Serverless Containers +tags: deploy host website webapp html static containerize application docker dockerfile +products: + - containers + - container-registry +dates: + validation: 2025-10-06 + posted: 2025-10-06 + validation_frequency: 12 +difficulty: beginner +usecase: + - application-hosting + - deploy-external-software + - website-hosting +ecosystem: + - third-party --- import Requirements from '@macros/iam/requirements.mdx' @@ -17,7 +28,6 @@ import Requirements from '@macros/iam/requirements.mdx' - Installed [Docker](https://docs.docker.com/get-started/get-docker/) or [Docker Egine](https://docs.docker.com/engine/install/) - [Created a Scaleway Container Registry namespace](/container-registry/how-to/create-namespace/) and [logged into it](/container-registry/how-to/connect-docker-cli/) - ## Create and host a simple HTML static page To host a static HTML page on Serverless Containers, you first need to create a simple HTML page that will serve as your website. Next, you will write a Dockerfile to containerize your application, specifying how your HTML file should be served. You will then build the container image locally, and push it to the [Scaleway Container Registry](/container-registry/), before deploying it to [Scaleway Serverless Containers](/serverless-containers/). @@ -49,7 +59,7 @@ To host a static HTML page on Serverless Containers, you first need to create a ```dockerfile FROM nginx:alpine - COPY ./my-website /usr/share/nginx/html + COPY ./my-static-website /usr/share/nginx/html EXPOSE 80 ``` @@ -76,4 +86,10 @@ To host a static HTML page on Serverless Containers, you first need to create a The deployment of your container can take up to a minute to complete. -6. Once your container is **ready**, click the **container endpoint** from its **Overview** tab. Your web page displays, and is available to anyone with the link. \ No newline at end of file +6. Once your container is **ready**, click the **container endpoint** from its **Overview** tab. Your web page displays, and is available to anyone with the link. + +## Going further + +- You can host a website composed of multiple pages in the `my-static-website` folder. +- You can [add a custom domain](/serverless-containers/how-to/add-a-custom-domain-to-a-container/) name to your website. +- You can host dynamic websites using dedicated frameworks for high-quality web applications. From f256422f6d68d47b113ff4cecbac40e93537aa95 Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Mon, 6 Oct 2025 15:52:48 +0200 Subject: [PATCH 05/16] feat(srv): update --- .../deploy-external-software/index.mdx | 14 ++-- pages/use-cases/website-hosting/index.mdx | 7 ++ .../index.mdx | 0 .../index.mdx | 80 +++++++++++++++++++ 4 files changed, 94 insertions(+), 7 deletions(-) rename tutorials/{hosting-websites-webapps-serverless-containers => hosting-static-websites-serverless-containers}/index.mdx (100%) create mode 100644 tutorials/hosting-webapps-serverless-containers/index.mdx diff --git a/pages/use-cases/deploy-external-software/index.mdx b/pages/use-cases/deploy-external-software/index.mdx index b0c6088f72..dc20762cc9 100644 --- a/pages/use-cases/deploy-external-software/index.mdx +++ b/pages/use-cases/deploy-external-software/index.mdx @@ -7,6 +7,13 @@ description: Discover how to deploy and manage external software with Scaleway's Need to deploy and manage external software on your cloud infrastructure? Scaleway provides the tools and services to help you deploy, manage, and scale external software efficiently. + - ## Related tutorials diff --git a/pages/use-cases/website-hosting/index.mdx b/pages/use-cases/website-hosting/index.mdx index ca40aa038b..92dcc997d6 100644 --- a/pages/use-cases/website-hosting/index.mdx +++ b/pages/use-cases/website-hosting/index.mdx @@ -38,6 +38,13 @@ Need to deploy a simple or complex website? Scaleway provides the tools and infr label="Read more" url="/tutorials/wordpress-instantapp/" /> + ## Related tutorials diff --git a/tutorials/hosting-websites-webapps-serverless-containers/index.mdx b/tutorials/hosting-static-websites-serverless-containers/index.mdx similarity index 100% rename from tutorials/hosting-websites-webapps-serverless-containers/index.mdx rename to tutorials/hosting-static-websites-serverless-containers/index.mdx diff --git a/tutorials/hosting-webapps-serverless-containers/index.mdx b/tutorials/hosting-webapps-serverless-containers/index.mdx new file mode 100644 index 0000000000..57dd4dc159 --- /dev/null +++ b/tutorials/hosting-webapps-serverless-containers/index.mdx @@ -0,0 +1,80 @@ +--- +title: Hosting a web app with Serverless Containers +description: This page provides guidelines on how to host and deploy dynamic web applications using Scaleway Serverless Containers +tags: deploy host website webapp react next containerize application docker dockerfile +products: + - containers + - container-registry +dates: + validation: 2025-10-06 + posted: 2025-10-06 + validation_frequency: 12 +difficulty: beginner +usecase: + - application-hosting + - deploy-external-software + - website-hosting +ecosystem: + - third-party +--- + +import Requirements from '@macros/iam/requirements.mdx' + + + + +- A Scaleway account logged into the [console](https://console.scaleway.com) +- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization +- Installed [Docker](https://docs.docker.com/get-started/get-docker/) or [Docker Egine](https://docs.docker.com/engine/install/) +- [Created a Scaleway Container Registry namespace](/container-registry/how-to/create-namespace/) and [logged into it](/container-registry/how-to/connect-docker-cli/) + +## Create and host a simple HTML static page + +To host a static HTML page on Serverless Containers, you first need to create a simple HTML page that will serve as your website. Next, you will write a Dockerfile to containerize your application, specifying how your HTML file should be served. You will then build the container image locally, and push it to the [Scaleway Container Registry](/container-registry/), before deploying it to [Scaleway Serverless Containers](/serverless-containers/). + +1. In a terminal, run the command below to create a new folder and access it: + + ```bash + mkdir my-static-website + cd my-static-website + ``` + +2. + + + +3. In the same folder, create a new `dockerfile` file and add the following code to it: + + ```dockerfile + ``` + +4. Run the command below to build, tag, and push your image to the Scaleway Container registry: + + ```bash + docker build \ + --platform linux/amd64 \ + --push \ + -t /my-static-website:latest . + ``` + + + You can find your Container Registry endpoint in the **Settings** tab of your Container Registry Endpoint in the [Scaleway console](https://console.scaleway.com/registry/namespaces) + + +5. [Deploy a Serverless Container](/serverless-containers/how-to/deploy-container/) with the following parameters: + + - **Registry**: Scaleway Container Registry + - **Registry namespace**: the Container Registry namespace you pushed your image to. + - **Container port**: `8O` as it is the [port](/serverless-containers/reference-content/port-parameter-variable/) exposed in the dockerfile. + - **Resources**: `100 mVCPU` and `256 MB` memory + - **Autoscaling**: set a minimum scale of `1` to avoid [cold starts](/serverless-containers/concepts/#cold-start) (optional). + + The deployment of your container can take up to a minute to complete. + +6. Once your container is **ready**, click the **container endpoint** from its **Overview** tab. Your web page displays, and is available to anyone with the link. + +## Going further + +- You can host a website composed of multiple pages in the `my-static-website` folder. +- You can [add a custom domain](/serverless-containers/how-to/add-a-custom-domain-to-a-container/) name to your website. +- You can host dynamic websites using dedicated frameworks for high-quality web applications. From 95afd3dcfed18d617eabb9940b54d3766cb7e7d1 Mon Sep 17 00:00:00 2001 From: Samy OUBOUAZIZ Date: Tue, 7 Oct 2025 11:30:59 +0200 Subject: [PATCH 06/16] feat(srv): update --- .../index.mdx | 86 +++++++++++++++---- 1 file changed, 71 insertions(+), 15 deletions(-) diff --git a/tutorials/hosting-webapps-serverless-containers/index.mdx b/tutorials/hosting-webapps-serverless-containers/index.mdx index 57dd4dc159..6d0175a6b8 100644 --- a/tutorials/hosting-webapps-serverless-containers/index.mdx +++ b/tutorials/hosting-webapps-serverless-containers/index.mdx @@ -20,7 +20,6 @@ ecosystem: import Requirements from '@macros/iam/requirements.mdx' - - A Scaleway account logged into the [console](https://console.scaleway.com) @@ -28,53 +27,110 @@ import Requirements from '@macros/iam/requirements.mdx' - Installed [Docker](https://docs.docker.com/get-started/get-docker/) or [Docker Egine](https://docs.docker.com/engine/install/) - [Created a Scaleway Container Registry namespace](/container-registry/how-to/create-namespace/) and [logged into it](/container-registry/how-to/connect-docker-cli/) -## Create and host a simple HTML static page +## Create and host a basic Next.js web application + +To host a Next.js web app on Serverless Containers, you must create a Next.js project, implement your pages and any API routes, and add a production-ready Dockerfile that builds and serves the app — either by running a Node server with `next build && next start` or by exporting static files with `next export` if your app is fully static. Build the container image locally, push it to the [Scaleway Container Registry](/container-registry/), and deploy it to [Scaleway Serverless Containers](/serverless-containers/). -To host a static HTML page on Serverless Containers, you first need to create a simple HTML page that will serve as your website. Next, you will write a Dockerfile to containerize your application, specifying how your HTML file should be served. You will then build the container image locally, and push it to the [Scaleway Container Registry](/container-registry/), before deploying it to [Scaleway Serverless Containers](/serverless-containers/). +### Create your app and test it locally 1. In a terminal, run the command below to create a new folder and access it: ```bash - mkdir my-static-website - cd my-static-website + mkdir my-nextjs-app + cd my-nextjs-app ``` -2. +2. Run the command below to create an example Next.js application using the default template. You can also use an example from the [official Next.js GitHub repository](https://github.com/vercel/next.js/tree/canary/examples). + + ```bash + npx create-next-app@latest my-nextjs-app + ``` +3. When prompted, configure your app according to your needs, or keep the default values to start quickly. Next.js will then create an app with a folder structure similar to the following: + ``` + my-nextjs-app/ + ├── app/ # Core: Routes using the App Router + │ ├── layout.tsx # Root layout (shared across pages) + │ ├── page.tsx # Homepage (http://localhost:3000) + │ └── globals.css # Global styles + │ + ├── public/ # Static assets (served at /) + │ ├── logo.svg + │ └── favicon.ico + │ + ├── components/ # (Optional) Your reusable components + │ └── ... + │ + ├── styles/ # (Optional) CSS modules or theme files + │ └── ... + │ + ├── next.config.js # Next.js configuration file + ├── tailwind.config.js # If you chose Tailwind + ├── postcss.config.js # PostCSS setup (used with Tailwind) + ├── package.json # Dependencies and scripts + ├── package-lock.json # Locked dependencies + ├── .gitignore # Git ignore rules + └── README.md # Auto-generated docs + ``` -3. In the same folder, create a new `dockerfile` file and add the following code to it: +4. Run the command below to run your application locally: + + ```bash + cd my-nextjs-app + npm run dev + ``` + + Access [http://localhost:3000](http://localhost:3000) to view the homepage of your web app. + +### Build the app image and push it to Scaleway Container Registry + +Before creating and pushing your image to the registry, make sure you have [Created a Scaleway Container Registry namespace](/container-registry/how-to/create-namespace/) and [logged into it](/container-registry/how-to/connect-docker-cli/). + +1. Create a new `dockerfile` file at the root of your app folder, then add the following code to it: ```dockerfile + # Build the Next.js app + FROM node:18-alpine + WORKDIR /app + COPY package*.json ./ + RUN npm install + COPY . . + RUN npm run build + + # Expose port and run server + EXPOSE 3000 + CMD ["npm", "start"] ``` -4. Run the command below to build, tag, and push your image to the Scaleway Container registry: +2. Run the command below to build, tag, and push your image to the Scaleway Container registry: ```bash docker build \ --platform linux/amd64 \ --push \ - -t /my-static-website:latest . + -t /my-nextjs-app:latest . ``` You can find your Container Registry endpoint in the **Settings** tab of your Container Registry Endpoint in the [Scaleway console](https://console.scaleway.com/registry/namespaces) -5. [Deploy a Serverless Container](/serverless-containers/how-to/deploy-container/) with the following parameters: +### Deploy your app using Serverless Containers + +1. [Deploy a Serverless Container](/serverless-containers/how-to/deploy-container/) with the following parameters: - **Registry**: Scaleway Container Registry - **Registry namespace**: the Container Registry namespace you pushed your image to. - - **Container port**: `8O` as it is the [port](/serverless-containers/reference-content/port-parameter-variable/) exposed in the dockerfile. - - **Resources**: `100 mVCPU` and `256 MB` memory + - **Container port**: `3000` as it is the [port](/serverless-containers/reference-content/port-parameter-variable/) exposed in the dockerfile. + - **Resources**: `1000 mVCPU` and `1024 MB` memory - **Autoscaling**: set a minimum scale of `1` to avoid [cold starts](/serverless-containers/concepts/#cold-start) (optional). The deployment of your container can take up to a minute to complete. -6. Once your container is **ready**, click the **container endpoint** from its **Overview** tab. Your web page displays, and is available to anyone with the link. +2. Once your container is **ready**, click the **container endpoint** from its **Overview** tab. Your web page displays, and is available to anyone with the link. ## Going further -- You can host a website composed of multiple pages in the `my-static-website` folder. +- You can deploy an already existing app by building its image and pushing it to the Scaleway Container registry as explained above. - You can [add a custom domain](/serverless-containers/how-to/add-a-custom-domain-to-a-container/) name to your website. -- You can host dynamic websites using dedicated frameworks for high-quality web applications. From 3e98c474fc8e21adfb03e77bb6066c5a230d4779 Mon Sep 17 00:00:00 2001 From: Samy OUBOUAZIZ Date: Tue, 7 Oct 2025 11:50:51 +0200 Subject: [PATCH 07/16] feat(srv): update --- tutorials/hosting-webapps-serverless-containers/index.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tutorials/hosting-webapps-serverless-containers/index.mdx b/tutorials/hosting-webapps-serverless-containers/index.mdx index 6d0175a6b8..8d30aa9634 100644 --- a/tutorials/hosting-webapps-serverless-containers/index.mdx +++ b/tutorials/hosting-webapps-serverless-containers/index.mdx @@ -1,6 +1,6 @@ --- -title: Hosting a web app with Serverless Containers -description: This page provides guidelines on how to host and deploy dynamic web applications using Scaleway Serverless Containers +title: Hosting a Next.js web app with Serverless Containers +description: This page provides guidelines on how to host and deploy dynamic Next.js web applications using Scaleway Serverless Containers tags: deploy host website webapp react next containerize application docker dockerfile products: - containers @@ -29,7 +29,7 @@ import Requirements from '@macros/iam/requirements.mdx' ## Create and host a basic Next.js web application -To host a Next.js web app on Serverless Containers, you must create a Next.js project, implement your pages and any API routes, and add a production-ready Dockerfile that builds and serves the app — either by running a Node server with `next build && next start` or by exporting static files with `next export` if your app is fully static. Build the container image locally, push it to the [Scaleway Container Registry](/container-registry/), and deploy it to [Scaleway Serverless Containers](/serverless-containers/). +To host a [Next.js](https://nextjs.org/) web app on Serverless Containers, you must create a Next.js project, implement your pages and any API routes, and add a production-ready Dockerfile that builds and serves the app — either by running a Node server with `next build && next start` or by exporting static files with `next export` if your app is fully static. Build the container image locally, push it to the [Scaleway Container Registry](/container-registry/), and deploy it to [Scaleway Serverless Containers](/serverless-containers/). ### Create your app and test it locally From 7d36f0c18234ea69ba1f4ea606596f864c4cb0b8 Mon Sep 17 00:00:00 2001 From: Samy OUBOUAZIZ Date: Tue, 7 Oct 2025 12:06:01 +0200 Subject: [PATCH 08/16] feat(srv): update --- .../index.mdx | 154 ++++++++++++++++++ .../index.mdx | 4 +- 2 files changed, 156 insertions(+), 2 deletions(-) create mode 100644 tutorials/hosting-django-webapp-serverless-containers/index.mdx diff --git a/tutorials/hosting-django-webapp-serverless-containers/index.mdx b/tutorials/hosting-django-webapp-serverless-containers/index.mdx new file mode 100644 index 0000000000..5e0cbaee48 --- /dev/null +++ b/tutorials/hosting-django-webapp-serverless-containers/index.mdx @@ -0,0 +1,154 @@ +--- +title: Hosting a Django web app with Serverless Containers +description: This page provides guidelines on how to host and deploy dynamic Django web applications using Scaleway Serverless Containers +tags: deploy host website webapp python django containerize application docker dockerfile +products: + - containers + - container-registry +dates: + validation: 2025-10-06 + posted: 2025-10-06 + validation_frequency: 12 +difficulty: beginner +usecase: + - application-hosting + - deploy-external-software + - website-hosting +ecosystem: + - third-party +--- + +import Requirements from '@macros/iam/requirements.mdx' + + + +- A Scaleway account logged into the [console](https://console.scaleway.com) +- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization +- Installed [Docker](https://docs.docker.com/get-started/get-docker/) or [Docker Engine](https://docs.docker.com/engine/install/) +- [Created a Scaleway Container Registry namespace](/container-registry/how-to/create-namespace/) and [logged into it](/container-registry/how-to/connect-docker-cli/) + +## Create and host a basic Django web application + +To host a [Django](https://www.djangoproject.com/) web application on **Scaleway Serverless Containers**, you need to create a Django project, define your views and URLs, and containerize it using a production-ready `Dockerfile`. The container will run a WSGI server (like Gunicorn) to serve your app. After building the image locally, push it to the [Scaleway Container Registry](/container-registry/) and deploy it via [Scaleway Serverless Containers](/serverless-containers/). + +### Create your app and test it locally + +1. In a terminal, create a new directory and navigate into it: + ```bash + mkdir my-django-app + cd my-django-app + ``` + +2. Create a virtual environment and install Django: + + + + ```bash + python3 -m venv venv + source venv/bin/activate + pip install django gunicorn + ``` + + + ```bash + python -m venv venv + venv\Scripts\activate + pip install django gunicorn + ``` + + + +3. Start a new Django project: + ```bash + django-admin startproject myproject . + ``` + +4. Verify the project structure: + ``` + my-django-app/ + ├── myproject/ + │ ├── __init__.py + │ ├── settings.py # Configuration + │ ├── urls.py # URL routing + │ └── wsgi.py # WSGI application entry point + ├── manage.py # CLI for Django commands + ├── venv/ # Virtual environment (excluded from Docker) + └── requirements.txt # To be created (lists dependencies) + ``` + +5. Create a `requirements.txt` file: + ```txt + Django==5.1.* + gunicorn==21.2.* + ``` + +6. Test the app locally: + ```bash + python manage.py runserver + ``` + Visit [http://localhost:8000](http://localhost:8000) to see the default Django welcome page. + +### Build the app image and push it to Scaleway Container Registry + +Before building and pushing your image, ensure you have [created a Scaleway Container Registry namespace](/container-registry/how-to/create-namespace/), and [logged into it with the Docker CLI](/container-registry/how-to/connect-docker-cli/) + +1. Create a `Dockerfile` at the root of your project: + ```dockerfile + # Use a lightweight Python image + FROM python:3.11-slim + + # Set working directory + WORKDIR /app + + # Install system dependencies + RUN apt-get update && apt-get install -y --no-install-recommends \ + && rm -rf /var/lib/apt/lists/* + + # Copy and install Python dependencies + COPY requirements.txt . + RUN pip install --no-cache-dir -r requirements.txt + + # Copy the rest of the application + COPY . . + + # Expose port + EXPOSE 8000 + + # Run Gunicorn as the entrypoint + CMD ["gunicorn", "--bind", "0.0.0.0:8000", "myproject.wsgi:application"] + ``` + +2. Build, tag, and push the image to Scaleway Container Registry: + ```bash + docker build \ + --platform linux/amd64 \ + --push \ + -t /my-django-app:latest . + ``` + + You can find your Container Registry endpoint in the **Overview** tab of your Container Registry namespace in the [Scaleway console](https://console.scaleway.com/registry/namespaces). + + +### Deploy your app using Serverless Containers + +1. [Deploy a Serverless Container](/serverless-containers/how-to/deploy-container/) with the following settings: + - **Registry**: Scaleway Container Registry + - **Registry namespace**: The namespace where you pushed your image + - **Container port**: `8000` as it is the [port](/serverless-containers/reference-content/port-parameter-variable/) exposed in the dockerfile. + - **Resources**: `512 mVCPU` and `512 MB` memory + - **Autoscaling**: Set minimum scale to `1` to avoid [cold starts](/serverless-containers/concepts/#cold-start) (optional) + + Deployment may take up to a minute. + +2. Once the container is **ready**, click the **container endpoint** in the **Overview** tab. Your Django app will be live and accessible to anyone with the link. + +## Going further + +- You can deploy an existing Django project by building and pushing its container image as shown above. +- [Add a custom domain](/serverless-containers/how-to/add-a-custom-domain-to-a-container/) to your deployed app. +- Secure your app by using environment variables for `SECRET_KEY` and `DEBUG` via the container’s environment settings in the console. +- Integrate with a database (e.g., PostgreSQL) by connecting to a managed Scaleway Database instance or using an external provider. + +``` + +> ✅ **Tip**: For production, always set `DEBUG=False` and use proper allowed hosts and secret key management. \ No newline at end of file diff --git a/tutorials/hosting-webapps-serverless-containers/index.mdx b/tutorials/hosting-webapps-serverless-containers/index.mdx index 8d30aa9634..1115e8719e 100644 --- a/tutorials/hosting-webapps-serverless-containers/index.mdx +++ b/tutorials/hosting-webapps-serverless-containers/index.mdx @@ -113,7 +113,7 @@ Before creating and pushing your image to the registry, make sure you have [Crea ``` - You can find your Container Registry endpoint in the **Settings** tab of your Container Registry Endpoint in the [Scaleway console](https://console.scaleway.com/registry/namespaces) + You can find your Container Registry endpoint in the **Overview** tab of your Container Registry Endpoint in the [Scaleway console](https://console.scaleway.com/registry/namespaces) ### Deploy your app using Serverless Containers @@ -123,7 +123,7 @@ Before creating and pushing your image to the registry, make sure you have [Crea - **Registry**: Scaleway Container Registry - **Registry namespace**: the Container Registry namespace you pushed your image to. - **Container port**: `3000` as it is the [port](/serverless-containers/reference-content/port-parameter-variable/) exposed in the dockerfile. - - **Resources**: `1000 mVCPU` and `1024 MB` memory + - **Resources**: `1000 mVCPU` and `1024 MB` memory. - **Autoscaling**: set a minimum scale of `1` to avoid [cold starts](/serverless-containers/concepts/#cold-start) (optional). The deployment of your container can take up to a minute to complete. From 243d958cd0e590a671e7b572c51c1941f51e5a2f Mon Sep 17 00:00:00 2001 From: Samy OUBOUAZIZ Date: Tue, 7 Oct 2025 13:47:48 +0200 Subject: [PATCH 09/16] feat(srv): update --- .../index.mdx | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/tutorials/hosting-django-webapp-serverless-containers/index.mdx b/tutorials/hosting-django-webapp-serverless-containers/index.mdx index 5e0cbaee48..80c4fcf810 100644 --- a/tutorials/hosting-django-webapp-serverless-containers/index.mdx +++ b/tutorials/hosting-django-webapp-serverless-containers/index.mdx @@ -72,8 +72,7 @@ To host a [Django](https://www.djangoproject.com/) web application on **Scaleway │ ├── urls.py # URL routing │ └── wsgi.py # WSGI application entry point ├── manage.py # CLI for Django commands - ├── venv/ # Virtual environment (excluded from Docker) - └── requirements.txt # To be created (lists dependencies) + └── venv/ # Virtual environment (excluded from Docker) ``` 5. Create a `requirements.txt` file: @@ -146,9 +145,3 @@ Before building and pushing your image, ensure you have [created a Scaleway Cont - You can deploy an existing Django project by building and pushing its container image as shown above. - [Add a custom domain](/serverless-containers/how-to/add-a-custom-domain-to-a-container/) to your deployed app. -- Secure your app by using environment variables for `SECRET_KEY` and `DEBUG` via the container’s environment settings in the console. -- Integrate with a database (e.g., PostgreSQL) by connecting to a managed Scaleway Database instance or using an external provider. - -``` - -> ✅ **Tip**: For production, always set `DEBUG=False` and use proper allowed hosts and secret key management. \ No newline at end of file From 7a83e6e76094debcc084f9a2d688a278f675532c Mon Sep 17 00:00:00 2001 From: Samy OUBOUAZIZ Date: Tue, 7 Oct 2025 13:51:50 +0200 Subject: [PATCH 10/16] feat(srv): update --- .../index.mdx | 160 ++++++++++++++++++ 1 file changed, 160 insertions(+) create mode 100644 tutorials/hosting-go-gin-webapp-serverless-containers/index.mdx diff --git a/tutorials/hosting-go-gin-webapp-serverless-containers/index.mdx b/tutorials/hosting-go-gin-webapp-serverless-containers/index.mdx new file mode 100644 index 0000000000..0fb25f713a --- /dev/null +++ b/tutorials/hosting-go-gin-webapp-serverless-containers/index.mdx @@ -0,0 +1,160 @@ +--- +title: Hosting a Go Gin web app with Serverless Containers +description: This page provides guidelines on how to host and deploy a Go web application using the Gin framework with Scaleway Serverless Containers +tags: deploy host website webapp go gin golang containerize application docker dockerfile +products: + - containers + - container-registry +dates: + validation: 2025-10-06 + posted: 2025-10-06 + validation_frequency: 12 +difficulty: beginner +usecase: + - application-hostor + - deploy-external-software + - website-hosting +ecosystem: + - third-party +--- +import Requirements from '@macros/iam/requirements.mdx' + +- A Scaleway account logged into the [console](https://console.scaleway.com) +- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization +- Installed [Docker](https://docs.docker.com/get-started/get-docker/) or [Docker Engine](https://docs.docker.com/engine/install/) +- [Created a Scaleway Container Registry namespace](/container-registry/how-to/create-namespace/) and [logged into it](/container-registry/how-to/connect-docker-cli/) +``` + +## Create and host a basic Go Gin web application + +To host a [Go](https://go.dev/) web application using the [Gin framework](https://gin-gonic.com/) on **Scaleway Serverless Containers**, you need to create a simple Go project, define HTTP handlers, and containerize it using a production-ready `Dockerfile`. After building the container image locally, push it to the [Scaleway Container Registry](/container-registry/) and deploy it via [Scaleway Serverless Containers](/serverless-containers/). + +Gin is a lightweight, high-performance web framework for Go, ideal for building fast APIs and web apps with minimal overhead. + +### Create your app and test it locally + +1. In a terminal, create a new directory and navigate into it: + ```bash + mkdir my-gin-app + cd my-gin-app + ``` + +2. Initialize a Go module: + ```bash + go mod init my-gin-app + ``` + +3. Create a `main.go` file with a basic Gin server: + ```go + package main + + import "github.com/gin-gonic/gin" + + func main() { + r := gin.Default() + + // Define a simple route + r.GET("/", func(c *gin.Context) { + c.JSON(200, gin.H{ + "message": "Hello from Gin on Scaleway!", + }) + }) + + // Start server on 0.0.0.0:8080 + r.Run("0.0.0.0:8080") + } + ``` + +4. Install Gin: + ```bash + go get -u github.com/gin-gonic/gin + ``` + +5. Test the app locally: + ```bash + go run main.go + ``` + Visit [http://localhost:8080](http://localhost:8080) to see the JSON response. + +6. Your project structure should now look like: + ``` + my-gin-app/ + ├── main.go + ├── go.mod + ├── go.sum + └── (optional) Dockerfile + ``` + +### Build the app image and push it to Scaleway Container Registry + +Before building and pushing your image, ensure you have: +- [Created a Scaleway Container Registry namespace](/container-registry/how-to/create-namespace/) +- [Logged into it with Docker CLI](/container-registry/how-to/connect-docker-cli/) + +1. Create a `Dockerfile` at the root of your project: + ```dockerfile + # Use a lightweight Go image for building + FROM golang:1.22-alpine AS builder + + # Set working directory + WORKDIR /app + + # Copy go mod files + COPY go.mod go.sum ./ + RUN go mod download + + # Copy source code + COPY . . + + # Build the Go binary + RUN go build -o main . + + # Final stage: minimal image + FROM alpine:latest + + # Install CA certificates + RUN apk --no-cache add ca-certificates + + # Set working directory + WORKDIR /root/ + + # Copy binary from builder stage + COPY --from=builder /app/main . + + # Expose port + EXPOSE 8080 + + # Run the binary + CMD ["./main"] + ``` + +2. Build, tag, and push the image to Scaleway Container Registry: + ```bash + docker build \ + --platform linux/amd64 \ + --push \ + -t /my-gin-app:latest . + ``` + + + You can find your Container Registry endpoint in the **Settings** tab of your Container Registry namespace in the [Scaleway console](https://console.scaleway.com/registry/namespaces). + + +### Deploy your app using Serverless Containers + +1. [Deploy a Serverless Container](/serverless-containers/how-to/deploy-container/) with the following settings: + - **Registry**: Scaleway Container Registry + - **Registry namespace**: The namespace where you pushed your image + - **Container port**: `8080` (matches the port in the Go app and Dockerfile) + - **Resources**: `256 mVCPU` and `256 MB` memory (Go apps are lightweight) + - **Autoscaling**: Set minimum scale to `1` to avoid [cold starts](/serverless-containers/concepts/#cold-start) (optional) + + Deployment may take up to a minute. + +2. Once the container is **ready**, click the **container endpoint** in the **Overview** tab. Your Gin app will be live and accessible to anyone with the link. + +## Going further + +- You can deploy an existing Go Gin project by building and pushing its container image as shown above. +- [Add a custom domain](/serverless-containers/how-to/add-a-custom-domain-to-a-container/) to your deployed app. +- Secure your app with HTTPS — Scaleway automatically provides TLS for container endpoints. From 6c746f4ca03585f9afdc61fc58159e90010f520a Mon Sep 17 00:00:00 2001 From: Samy OUBOUAZIZ Date: Tue, 7 Oct 2025 15:48:39 +0200 Subject: [PATCH 11/16] feat(srv): update --- .../index.mdx | 18 ++++++++++++++---- .../index.mdx | 5 ++++- .../index.mdx | 0 3 files changed, 18 insertions(+), 5 deletions(-) rename tutorials/{hosting-webapps-serverless-containers => hosting-nextjs-webapp-serverless-containers}/index.mdx (100%) diff --git a/tutorials/hosting-django-webapp-serverless-containers/index.mdx b/tutorials/hosting-django-webapp-serverless-containers/index.mdx index 80c4fcf810..4bc5e7b757 100644 --- a/tutorials/hosting-django-webapp-serverless-containers/index.mdx +++ b/tutorials/hosting-django-webapp-serverless-containers/index.mdx @@ -75,13 +75,13 @@ To host a [Django](https://www.djangoproject.com/) web application on **Scaleway └── venv/ # Virtual environment (excluded from Docker) ``` -5. Create a `requirements.txt` file: +5. Create a `requirements.txt` file and add the following code to it: ```txt Django==5.1.* gunicorn==21.2.* ``` -6. Test the app locally: +6. Run the following command to test the app locally: ```bash python manage.py runserver ``` @@ -91,7 +91,7 @@ To host a [Django](https://www.djangoproject.com/) web application on **Scaleway Before building and pushing your image, ensure you have [created a Scaleway Container Registry namespace](/container-registry/how-to/create-namespace/), and [logged into it with the Docker CLI](/container-registry/how-to/connect-docker-cli/) -1. Create a `Dockerfile` at the root of your project: +1. Create a `Dockerfile` at the root of your Django app: ```dockerfile # Use a lightweight Python image FROM python:3.11-slim @@ -117,7 +117,17 @@ Before building and pushing your image, ensure you have [created a Scaleway Cont CMD ["gunicorn", "--bind", "0.0.0.0:8000", "myproject.wsgi:application"] ``` -2. Build, tag, and push the image to Scaleway Container Registry: +2. Edit the `settings.py` file of your project with the code below to allow the Scaleway endpoint corresponding to your region, and remove unwanted endpoints: + + ```py + ALLOWED_HOSTS = [ + '.fr-par.scw.cloud', + '.nl-ams.scw.cloud', + '.pl-waw.scw.cloud' + ] + ``` + +3. Build, tag, and push the image to Scaleway Container Registry: ```bash docker build \ --platform linux/amd64 \ diff --git a/tutorials/hosting-go-gin-webapp-serverless-containers/index.mdx b/tutorials/hosting-go-gin-webapp-serverless-containers/index.mdx index 0fb25f713a..caf5ec2ec5 100644 --- a/tutorials/hosting-go-gin-webapp-serverless-containers/index.mdx +++ b/tutorials/hosting-go-gin-webapp-serverless-containers/index.mdx @@ -17,13 +17,16 @@ usecase: ecosystem: - third-party --- + import Requirements from '@macros/iam/requirements.mdx' + + - A Scaleway account logged into the [console](https://console.scaleway.com) - [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization - Installed [Docker](https://docs.docker.com/get-started/get-docker/) or [Docker Engine](https://docs.docker.com/engine/install/) - [Created a Scaleway Container Registry namespace](/container-registry/how-to/create-namespace/) and [logged into it](/container-registry/how-to/connect-docker-cli/) -``` + ## Create and host a basic Go Gin web application diff --git a/tutorials/hosting-webapps-serverless-containers/index.mdx b/tutorials/hosting-nextjs-webapp-serverless-containers/index.mdx similarity index 100% rename from tutorials/hosting-webapps-serverless-containers/index.mdx rename to tutorials/hosting-nextjs-webapp-serverless-containers/index.mdx From 4542f1701714185c6b8b015e00e4730a1825fe66 Mon Sep 17 00:00:00 2001 From: Samy OUBOUAZIZ Date: Tue, 7 Oct 2025 17:43:16 +0200 Subject: [PATCH 12/16] feat(srv): update --- .../index.mdx | 2 +- .../index.mdx | 62 ++++++++++++------- 2 files changed, 42 insertions(+), 22 deletions(-) diff --git a/tutorials/hosting-django-webapp-serverless-containers/index.mdx b/tutorials/hosting-django-webapp-serverless-containers/index.mdx index 4bc5e7b757..d3fbb2d49f 100644 --- a/tutorials/hosting-django-webapp-serverless-containers/index.mdx +++ b/tutorials/hosting-django-webapp-serverless-containers/index.mdx @@ -89,7 +89,7 @@ To host a [Django](https://www.djangoproject.com/) web application on **Scaleway ### Build the app image and push it to Scaleway Container Registry -Before building and pushing your image, ensure you have [created a Scaleway Container Registry namespace](/container-registry/how-to/create-namespace/), and [logged into it with the Docker CLI](/container-registry/how-to/connect-docker-cli/) +Before building and pushing your image, ensure you have [created a Scaleway Container Registry namespace](/container-registry/how-to/create-namespace/), and [logged into it with the Docker CLI](/container-registry/how-to/connect-docker-cli/). 1. Create a `Dockerfile` at the root of your Django app: ```dockerfile diff --git a/tutorials/hosting-go-gin-webapp-serverless-containers/index.mdx b/tutorials/hosting-go-gin-webapp-serverless-containers/index.mdx index caf5ec2ec5..72c323576f 100644 --- a/tutorials/hosting-go-gin-webapp-serverless-containers/index.mdx +++ b/tutorials/hosting-go-gin-webapp-serverless-containers/index.mdx @@ -26,6 +26,7 @@ import Requirements from '@macros/iam/requirements.mdx' - [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization - Installed [Docker](https://docs.docker.com/get-started/get-docker/) or [Docker Engine](https://docs.docker.com/engine/install/) - [Created a Scaleway Container Registry namespace](/container-registry/how-to/create-namespace/) and [logged into it](/container-registry/how-to/connect-docker-cli/) +- [Installed go 1.23 or newer](https://go.dev/doc/install) ## Create and host a basic Go Gin web application @@ -47,7 +48,7 @@ Gin is a lightweight, high-performance web framework for Go, ideal for building go mod init my-gin-app ``` -3. Create a `main.go` file with a basic Gin server: +3. Create a `main.go` file, then add the code below to it to create a basic Gin server: ```go package main @@ -55,44 +56,63 @@ Gin is a lightweight, high-performance web framework for Go, ideal for building func main() { r := gin.Default() + r.LoadHTMLGlob("templates/*") - // Define a simple route r.GET("/", func(c *gin.Context) { - c.JSON(200, gin.H{ - "message": "Hello from Gin on Scaleway!", - }) + c.HTML(200, "index.html", nil) }) - // Start server on 0.0.0.0:8080 r.Run("0.0.0.0:8080") } ``` -4. Install Gin: +4. Create a `templates` folder to store HTTP files. + ```bash - go get -u github.com/gin-gonic/gin + mkdir templates ``` -5. Test the app locally: - ```bash - go run main.go +5. Create an `index.html` file in the `templates` folder, then add the code below to it: + + ```html + + + + + + Hello + + + +

Hello from Gin 🌿

+

A minimal page, fast and clean, running on Scaleway Serverless Containers.

+ + ``` - Visit [http://localhost:8080](http://localhost:8080) to see the JSON response. -6. Your project structure should now look like: +6. Run the following command to install the Gin package: + ```bash + go get -u github.com/gin-gonic/gin ``` - my-gin-app/ - ├── main.go - ├── go.mod - ├── go.sum - └── (optional) Dockerfile + +7. Test the app locally: + ```bash + go run main.go ``` + Visit [http://localhost:8080](http://localhost:8080) to see the homepage of your web app. ### Build the app image and push it to Scaleway Container Registry -Before building and pushing your image, ensure you have: -- [Created a Scaleway Container Registry namespace](/container-registry/how-to/create-namespace/) -- [Logged into it with Docker CLI](/container-registry/how-to/connect-docker-cli/) +Before building and pushing your image, ensure you have [created a Scaleway Container Registry namespace](/container-registry/how-to/create-namespace/), and [logged into it with the Docker CLI](/container-registry/how-to/connect-docker-cli/). 1. Create a `Dockerfile` at the root of your project: ```dockerfile From 1737f34dc82452fe6e8ca5abb47246003904a93f Mon Sep 17 00:00:00 2001 From: Samy OUBOUAZIZ Date: Wed, 8 Oct 2025 12:18:50 +0200 Subject: [PATCH 13/16] feat(srv): update --- .../use-case-informational-website.mdx | 15 ++++++++++++++- pages/use-cases/application-hosting/index.mdx | 16 ++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/pages/account/reference-content/use-case-informational-website.mdx b/pages/account/reference-content/use-case-informational-website.mdx index 6d61dedac3..94c3666add 100644 --- a/pages/account/reference-content/use-case-informational-website.mdx +++ b/pages/account/reference-content/use-case-informational-website.mdx @@ -3,7 +3,7 @@ title: Hosting an informational website description: Learn about the different ways to deploy an informational website (blog, portfolio, showcase) with Scaleway. tags: use-case informational-website website blog portfolio showcase dates: - validation: 2025-05-15 + validation: 2025-10-08 posted: 2025-05-15 --- @@ -16,6 +16,7 @@ Your informational website can be based on several different architectures, that | Based on Object Storage | Cost-effective and highly available, suitable for static content. | Limited to serving static files, no server-side processing. | | Based on Web Hosting | Easy to set up and manage, suitable for small to medium websites. | Less control over the environment, can be limited in terms of customization. | | Based on Instances | Full control over the server environment, suitable for complex applications. | More complex setup and management, potentially higher costs. | +| Based on Serverless containers | Easy to deploy, scalable performance and cost, for static and dynamic websites. | Limited control on underlying hardware. | | Based on Elastic Metal (Aluminium) and Flexible IPs | Dedicated physical resources and high performance, suitable for demanding applications. | Higher costs, requires more technical expertise to manage. | @@ -72,6 +73,18 @@ Hosting using Instances is a solution suited for users familiar with Unix operat 5. (Optional) Edit your WordPress settings to add your domain name. +## Hosting a website using Serverless Containers + +1. [Register a domain name](/domains-and-dns/quickstart/#how-to-register-an-internal-domain/). Scaleway Domains and DNS allows you to manage and register your internal and external domains and configure and manage their DNS zones. + +2. Containerize your application, then build and [push its image to the Scaleway Container Registry](/serverless-containers/how-to/build-push-container-image/). + +3. [Deploy a Serverless Container](/serverless-containers/how-to/deploy-container/) based on your app image. + +4. [Add a custom domain to your container](/serverless-containers/how-to/add-a-custom-domain-to-a-container/). + +Refer to the [Containers use cases page](/serverless-containers/reference-content/use-cases/) for more information on the different apps you can deploy using Serverless Containers. + ## Hosting a website using Elastic Metal (Aluminium) Elastic Metal (Aluminium) is an expert-level solution for users who require full control over the infrastructure. It provides optimal performance by leveraging the dedicated hardware resources at a cost lower than equivalent instances. You can install any operating system and applications you need, but you are responsible for maintaining your entire software stack. diff --git a/pages/use-cases/application-hosting/index.mdx b/pages/use-cases/application-hosting/index.mdx index e1705dc6ec..f4496f8dd4 100644 --- a/pages/use-cases/application-hosting/index.mdx +++ b/pages/use-cases/application-hosting/index.mdx @@ -22,6 +22,22 @@ Looking to deploy a web application? Scaleway offers scalable and secure hosting url="/tutorials/deploy-saas-application/" /> + + + + ## Related tutorials From 9c8ffdd245d93688b4eaf5c12d16c3c68d181a18 Mon Sep 17 00:00:00 2001 From: Samy OUBOUAZIZ Date: Wed, 8 Oct 2025 16:59:46 +0200 Subject: [PATCH 14/16] feat(srv): update --- tutorials/hosting-django-webapp-serverless-containers/index.mdx | 2 ++ tutorials/hosting-go-gin-webapp-serverless-containers/index.mdx | 2 ++ tutorials/hosting-nextjs-webapp-serverless-containers/index.mdx | 2 ++ 3 files changed, 6 insertions(+) diff --git a/tutorials/hosting-django-webapp-serverless-containers/index.mdx b/tutorials/hosting-django-webapp-serverless-containers/index.mdx index d3fbb2d49f..667276b788 100644 --- a/tutorials/hosting-django-webapp-serverless-containers/index.mdx +++ b/tutorials/hosting-django-webapp-serverless-containers/index.mdx @@ -20,6 +20,8 @@ ecosystem: import Requirements from '@macros/iam/requirements.mdx' +[Django](https://www.djangoproject.com/) is a robust Python framework designed for rapid development of secure and maintainable web applications. Hosting Django on [Scaleway Serverless Containers](/serverless-containers/) provides automatic scaling, simplified deployment, and reduced infrastructure management. This deployment method allows your application to efficiently handle varying workloads, optimize resource usage, and focus on writing code and delivering features rather than maintaining servers. + - A Scaleway account logged into the [console](https://console.scaleway.com) diff --git a/tutorials/hosting-go-gin-webapp-serverless-containers/index.mdx b/tutorials/hosting-go-gin-webapp-serverless-containers/index.mdx index 72c323576f..fe88aa9a87 100644 --- a/tutorials/hosting-go-gin-webapp-serverless-containers/index.mdx +++ b/tutorials/hosting-go-gin-webapp-serverless-containers/index.mdx @@ -20,6 +20,8 @@ ecosystem: import Requirements from '@macros/iam/requirements.mdx' +[Gin](https://gin-gonic.com/) is a lightweight, high-performance web framework for Go, ideal for building fast APIs and web applications with minimal overhead. Hosting Gin apps on [Scaleway Serverless Containers](/serverless-containers/) provides automatic scaling, simplified deployment, and reduced infrastructure management. This deployment method enables your application to efficiently handle varying workloads, optimize resource usage, and lets you focus on writing code and building features rather than maintaining servers. + - A Scaleway account logged into the [console](https://console.scaleway.com) diff --git a/tutorials/hosting-nextjs-webapp-serverless-containers/index.mdx b/tutorials/hosting-nextjs-webapp-serverless-containers/index.mdx index 1115e8719e..0d2ba9b97e 100644 --- a/tutorials/hosting-nextjs-webapp-serverless-containers/index.mdx +++ b/tutorials/hosting-nextjs-webapp-serverless-containers/index.mdx @@ -20,6 +20,8 @@ ecosystem: import Requirements from '@macros/iam/requirements.mdx' +[Next.js](https://nextjs.org/) is a powerful React framework for building fast, scalable web applications with server-side rendering and static site generation. Hosting Next.js on [Scaleway Serverless Containers](/serverless-containers/) provides automatic scaling, simplified deployment, and minimal infrastructure management. This approach lets your application efficiently handle dynamic traffic, optimize resource usage, and focus on writing code and developing features rather than maintaining servers. + - A Scaleway account logged into the [console](https://console.scaleway.com) From 3a81da99e492c3c34147f54eb46e27b14c6da5b1 Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Mon, 13 Oct 2025 16:01:35 +0200 Subject: [PATCH 15/16] Apply suggestions from code review Co-authored-by: Thomas TACQUET --- .../reference-content/use-case-informational-website.mdx | 2 +- .../hosting-django-webapp-serverless-containers/index.mdx | 2 +- .../hosting-go-gin-webapp-serverless-containers/index.mdx | 4 ++-- .../hosting-nextjs-webapp-serverless-containers/index.mdx | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pages/account/reference-content/use-case-informational-website.mdx b/pages/account/reference-content/use-case-informational-website.mdx index 94c3666add..dd81302318 100644 --- a/pages/account/reference-content/use-case-informational-website.mdx +++ b/pages/account/reference-content/use-case-informational-website.mdx @@ -16,7 +16,7 @@ Your informational website can be based on several different architectures, that | Based on Object Storage | Cost-effective and highly available, suitable for static content. | Limited to serving static files, no server-side processing. | | Based on Web Hosting | Easy to set up and manage, suitable for small to medium websites. | Less control over the environment, can be limited in terms of customization. | | Based on Instances | Full control over the server environment, suitable for complex applications. | More complex setup and management, potentially higher costs. | -| Based on Serverless containers | Easy to deploy, scalable performance and cost, for static and dynamic websites. | Limited control on underlying hardware. | +| Based on Serverless Containers | Easy to deploy, scalable performance and cost, for static and dynamic websites. | Limited control on underlying hardware. | | Based on Elastic Metal (Aluminium) and Flexible IPs | Dedicated physical resources and high performance, suitable for demanding applications. | Higher costs, requires more technical expertise to manage. | diff --git a/tutorials/hosting-django-webapp-serverless-containers/index.mdx b/tutorials/hosting-django-webapp-serverless-containers/index.mdx index 667276b788..a44bc37e50 100644 --- a/tutorials/hosting-django-webapp-serverless-containers/index.mdx +++ b/tutorials/hosting-django-webapp-serverless-containers/index.mdx @@ -146,7 +146,7 @@ Before building and pushing your image, ensure you have [created a Scaleway Cont - **Registry**: Scaleway Container Registry - **Registry namespace**: The namespace where you pushed your image - **Container port**: `8000` as it is the [port](/serverless-containers/reference-content/port-parameter-variable/) exposed in the dockerfile. - - **Resources**: `512 mVCPU` and `512 MB` memory + - **Resources**: `500 mVCPU` and `512 MB` memory - **Autoscaling**: Set minimum scale to `1` to avoid [cold starts](/serverless-containers/concepts/#cold-start) (optional) Deployment may take up to a minute. diff --git a/tutorials/hosting-go-gin-webapp-serverless-containers/index.mdx b/tutorials/hosting-go-gin-webapp-serverless-containers/index.mdx index fe88aa9a87..09257febc9 100644 --- a/tutorials/hosting-go-gin-webapp-serverless-containers/index.mdx +++ b/tutorials/hosting-go-gin-webapp-serverless-containers/index.mdx @@ -119,7 +119,7 @@ Before building and pushing your image, ensure you have [created a Scaleway Cont 1. Create a `Dockerfile` at the root of your project: ```dockerfile # Use a lightweight Go image for building - FROM golang:1.22-alpine AS builder + FROM golang:1.25-alpine AS builder # Set working directory WORKDIR /app @@ -171,7 +171,7 @@ Before building and pushing your image, ensure you have [created a Scaleway Cont - **Registry**: Scaleway Container Registry - **Registry namespace**: The namespace where you pushed your image - **Container port**: `8080` (matches the port in the Go app and Dockerfile) - - **Resources**: `256 mVCPU` and `256 MB` memory (Go apps are lightweight) + - **Resources**: `250 mVCPU` and `256 MB` memory (Go apps are lightweight) - **Autoscaling**: Set minimum scale to `1` to avoid [cold starts](/serverless-containers/concepts/#cold-start) (optional) Deployment may take up to a minute. diff --git a/tutorials/hosting-nextjs-webapp-serverless-containers/index.mdx b/tutorials/hosting-nextjs-webapp-serverless-containers/index.mdx index 0d2ba9b97e..0d34dd8361 100644 --- a/tutorials/hosting-nextjs-webapp-serverless-containers/index.mdx +++ b/tutorials/hosting-nextjs-webapp-serverless-containers/index.mdx @@ -93,7 +93,7 @@ Before creating and pushing your image to the registry, make sure you have [Crea ```dockerfile # Build the Next.js app - FROM node:18-alpine + FROM node:22-alpine WORKDIR /app COPY package*.json ./ RUN npm install From c58ddc230a9e8c6b11fd3b181bfeda6c88f5b881 Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Tue, 14 Oct 2025 15:01:24 +0200 Subject: [PATCH 16/16] Apply suggestions from code review Co-authored-by: Rowena Jones <36301604+RoRoJ@users.noreply.github.com> --- .../reference-content/use-case-informational-website.mdx | 2 +- tutorials/hosting-django-webapp-serverless-containers/index.mdx | 2 +- tutorials/hosting-nextjs-webapp-serverless-containers/index.mdx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/account/reference-content/use-case-informational-website.mdx b/pages/account/reference-content/use-case-informational-website.mdx index dd81302318..a68cd06293 100644 --- a/pages/account/reference-content/use-case-informational-website.mdx +++ b/pages/account/reference-content/use-case-informational-website.mdx @@ -16,7 +16,7 @@ Your informational website can be based on several different architectures, that | Based on Object Storage | Cost-effective and highly available, suitable for static content. | Limited to serving static files, no server-side processing. | | Based on Web Hosting | Easy to set up and manage, suitable for small to medium websites. | Less control over the environment, can be limited in terms of customization. | | Based on Instances | Full control over the server environment, suitable for complex applications. | More complex setup and management, potentially higher costs. | -| Based on Serverless Containers | Easy to deploy, scalable performance and cost, for static and dynamic websites. | Limited control on underlying hardware. | +| Based on Serverless Containers | Easy to deploy, scalable performance and cost, for static and dynamic websites. | Limited control over underlying hardware. | | Based on Elastic Metal (Aluminium) and Flexible IPs | Dedicated physical resources and high performance, suitable for demanding applications. | Higher costs, requires more technical expertise to manage. | diff --git a/tutorials/hosting-django-webapp-serverless-containers/index.mdx b/tutorials/hosting-django-webapp-serverless-containers/index.mdx index a44bc37e50..397bbd89ac 100644 --- a/tutorials/hosting-django-webapp-serverless-containers/index.mdx +++ b/tutorials/hosting-django-webapp-serverless-containers/index.mdx @@ -20,7 +20,7 @@ ecosystem: import Requirements from '@macros/iam/requirements.mdx' -[Django](https://www.djangoproject.com/) is a robust Python framework designed for rapid development of secure and maintainable web applications. Hosting Django on [Scaleway Serverless Containers](/serverless-containers/) provides automatic scaling, simplified deployment, and reduced infrastructure management. This deployment method allows your application to efficiently handle varying workloads, optimize resource usage, and focus on writing code and delivering features rather than maintaining servers. +[Django](https://www.djangoproject.com/) is a robust Python framework designed for rapid development of secure and maintainable web applications. Hosting Django on [Scaleway Serverless Containers](/serverless-containers/) provides automatic scaling, simplified deployment, and reduced infrastructure management. This deployment method allows your application to efficiently handle varying workloads, while you can optimize resource usage, and focus on writing code and delivering features rather than maintaining servers. diff --git a/tutorials/hosting-nextjs-webapp-serverless-containers/index.mdx b/tutorials/hosting-nextjs-webapp-serverless-containers/index.mdx index 0d34dd8361..8d4f6163d3 100644 --- a/tutorials/hosting-nextjs-webapp-serverless-containers/index.mdx +++ b/tutorials/hosting-nextjs-webapp-serverless-containers/index.mdx @@ -20,7 +20,7 @@ ecosystem: import Requirements from '@macros/iam/requirements.mdx' -[Next.js](https://nextjs.org/) is a powerful React framework for building fast, scalable web applications with server-side rendering and static site generation. Hosting Next.js on [Scaleway Serverless Containers](/serverless-containers/) provides automatic scaling, simplified deployment, and minimal infrastructure management. This approach lets your application efficiently handle dynamic traffic, optimize resource usage, and focus on writing code and developing features rather than maintaining servers. +[Next.js](https://nextjs.org/) is a powerful React framework for building fast, scalable web applications with server-side rendering and static site generation. Hosting Next.js on [Scaleway Serverless Containers](/serverless-containers/) provides automatic scaling, simplified deployment, and minimal infrastructure management. This approach lets your application efficiently handle dynamic traffic, optimize resource usage, while you can focus on writing code and developing features rather than maintaining servers.