Skip to content

Commit 228ed40

Browse files
committed
feat(srv): update
1 parent 761c8ff commit 228ed40

File tree

1 file changed

+37
-36
lines changed
  • tutorials/hosting-websites-webapps-serverless-containers

1 file changed

+37
-36
lines changed

tutorials/hosting-websites-webapps-serverless-containers/index.mdx

Lines changed: 37 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -24,55 +24,56 @@ To host a static HTML page on Serverless Containers, you first need to create a
2424

2525
1. In a terminal, run the command below to create a new folder and access it:
2626

27-
```sh
28-
mkdir my-static-website
29-
cd my-static-website
30-
```
27+
```bash
28+
mkdir my-static-website
29+
cd my-static-website
30+
```
3131

3232
2. Create a new `index.html` file and add the example code below to it:
3333

34-
```html
35-
<!DOCTYPE html>
36-
<html lang="en">
37-
<head>
38-
<meta charset="UTF-8">
39-
<title>Simple HTML Page</title>
40-
</head>
41-
<body>
42-
<h1>Hello World</h1>
43-
<p>This is a simple paragraph.</p>
44-
</body>
45-
</html>
46-
```
34+
```html
35+
<!DOCTYPE html>
36+
<html lang="en">
37+
<head>
38+
<meta charset="UTF-8">
39+
<title>Simple HTML Page</title>
40+
</head>
41+
<body>
42+
<h1>Hello World</h1>
43+
<p>This is a simple paragraph.</p>
44+
</body>
45+
</html>
46+
```
4747

4848
3. In the same folder, create a new `dockerfile` file and add the following code to it:
4949

50-
```dockerfile
51-
FROM nginx:alpine
52-
COPY ./my-website /usr/share/nginx/html
53-
EXPOSE 80
54-
```
50+
```dockerfile
51+
FROM nginx:alpine
52+
COPY ./my-website /usr/share/nginx/html
53+
EXPOSE 80
54+
```
5555

5656
4. Run the command below to build, tag, and push your image to the Scaleway Container registry:
5757

58-
```sh
59-
docker build --platform linux/amd64 \
60-
--push \
61-
-t <CONTAINER_REGISTRY_ENDPOINT>/my-static-website:latest .
62-
```
58+
```bash
59+
docker build \
60+
--platform linux/amd64 \
61+
--push \
62+
-t <CONTAINER_REGISTRY_ENDPOINT>/my-static-website:latest .
63+
```
6364

64-
<Message type="note">
65-
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)
66-
</Message>
65+
<Message type="note">
66+
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)
67+
</Message>
6768

6869
5. [Deploy a Serverless Container](/serverless-containers/how-to/deploy-container/) with the following parameters:
6970

70-
- **Registry**: Scaleway Container Registry
71-
- **Registry namespace**: the Container Registry namespace you pushed your image to.
72-
- **Container port**: `8O` as it is the [port](/serverless-containers/reference-content/port-parameter-variable/) exposed in the dockerfile.
73-
- **Resources**: `100 mVCPU` and `256 MB` memory
74-
- **Autoscaling**: according to your needs. Refer to the [autoscaling documentation](/serverless-containers/reference-content/containers-autoscaling/) for more information.
71+
- **Registry**: Scaleway Container Registry
72+
- **Registry namespace**: the Container Registry namespace you pushed your image to.
73+
- **Container port**: `8O` as it is the [port](/serverless-containers/reference-content/port-parameter-variable/) exposed in the dockerfile.
74+
- **Resources**: `100 mVCPU` and `256 MB` memory
75+
- **Autoscaling**: according to your needs. Refer to the [autoscaling documentation](/serverless-containers/reference-content/containers-autoscaling/) for more information.
7576

76-
The deployment of your container can take up to a minute to complete.
77+
The deployment of your container can take up to a minute to complete.
7778

7879
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.

0 commit comments

Comments
 (0)