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
@@ -50,8 +50,6 @@ Serverless Framework handles everything from creating namespaces to function/cod
50
50
-[Configuration](#configuration)
51
51
-[Supported commands](#supported-commands)
52
52
-[Security and secret management](#security-and-secret-management)
53
-
-[Events](#events)
54
-
-[Custom domains](#custom-domains)
55
53
-[Deployment methods](#deployment-methods)
56
54
-[Local testing](#local-testing)
57
55
-[Managing containers](#managing-containers)
@@ -215,15 +213,11 @@ custom:
215
213
key-b: "value-b"
216
214
```
217
215
218
-
### Deployment methods
216
+
## Auto-deletion
219
217
220
-
At Scaleway, there are multiple ways to create Serverless Functions and Serverless Containers. These include: the CLI, APIs, the Scaleway console, Serverless Framework and Terraform.
218
+
By default, the `serverless deploy` command applies the configuration located in your `serverless.yml` and removes functions in that namespace that are not in the file.
221
219
222
-
The `serverless deploy` command applies the configuration located in your `serverless.yml` and removes functions that are not in the file to ensure a single source of truth.
223
-
224
-
This can be controlled using the `singleSource` option. By default its value is `false`.
225
-
226
-
If `singleSource` is set to `true`, functions and containers not defined in your serverless configuration file will be removed the next time you run the `serverless deploy` command.
220
+
This can be switched off by setting the `singleSource` option to `false`.
227
221
228
222
### Local testing
229
223
@@ -234,48 +228,6 @@ Documentation is available through runtimes frameworks for :
- You have [created a Container Registry namespace](https://www.scaleway.com/en/docs/compute/container-registry/how-to/create-namespace/)
241
-
- You have installed Docker and can build and push your image to your registry.
242
-
243
-
To manage your containers, you must first define them in the `custom.containers` field in your `serverless.yml` configuration file.
244
-
245
-
Each container must specify the relative path of its application directory (containing the Dockerfile, and all files related to the application to deploy):
246
-
247
-
```yml
248
-
custom:
249
-
containers:
250
-
mycontainer:
251
-
directory: my-container-directory
252
-
# port: 8080
253
-
# Environment only available in this container
254
-
env:
255
-
MY_VARIABLE: "my-value"
256
-
```
257
-
258
-
Below is an example of the files you should have in your application directory. The directory that contains your Dockerfile and scripts is called `my-container-directory`.
259
-
260
-
```
261
-
.
262
-
├── my-container-directory
263
-
│ ├── Dockerfile
264
-
│ ├── requirements.txt
265
-
│ ├── server.py
266
-
│ └── (...)
267
-
├── node_modules
268
-
│ ├── serverless-scaleway-functions
269
-
│ └── (...)
270
-
├── package-lock.json
271
-
├── package.json
272
-
└── serverless.yml
273
-
```
274
-
275
-
Scaleway's platform will automatically inject a PORT environment variable on which your server should be listening for incoming traffic. By default, this PORT is 8080. You can change the `port` in the `serverless.yml` file.
276
-
277
-
You can use the container example provided on this [documentation page](https://github.com/scaleway/serverless-scaleway-functions/tree/master/examples/container) to get started.
278
-
279
231
## Logs
280
232
281
233
The `serverless logs` command lets you watch the logs of a specific function or container.
- You have [created a Container Registry namespace](https://www.scaleway.com/en/docs/compute/container-registry/how-to/create-namespace/)
5
+
- You have installed Docker and can build and push your image to your registry.
6
+
7
+
To manage your containers, you must first define them in the `custom.containers` field in your `serverless.yml` configuration file.
8
+
9
+
Each container must specify the relative path of its application directory (containing the Dockerfile, and all files related to the application to deploy):
10
+
11
+
```yml
12
+
custom:
13
+
containers:
14
+
mycontainer:
15
+
directory: my-container-directory
16
+
# port: 8080
17
+
# Environment only available in this container
18
+
env:
19
+
MY_VARIABLE: "my-value"
20
+
```
21
+
22
+
Below is an example of the files you should have in your application directory. The directory that contains your Dockerfile and scripts is called `my-container-directory`.
23
+
24
+
```
25
+
.
26
+
├── my-container-directory
27
+
│ ├── Dockerfile
28
+
│ ├── requirements.txt
29
+
│ ├── server.py
30
+
│ └── (...)
31
+
├── node_modules
32
+
│ ├── serverless-scaleway-functions
33
+
│ └── (...)
34
+
├── package-lock.json
35
+
├── package.json
36
+
└── serverless.yml
37
+
```
38
+
39
+
Scaleway's platform will automatically inject a PORT environment variable on which your server should be listening for incoming traffic. By default, this PORT is 8080. You can change the `port` in the `serverless.yml` file.
40
+
41
+
You can use the container example provided on this [documentation page](https://github.com/scaleway/serverless-scaleway-functions/tree/master/examples/container) to get started.
0 commit comments