Wasmer Edge Configuration
Wasmer Edge's configuration is stored in a app.yaml
file in the root of your project.
Example
For a basic static site this file contains the following information:
kind: wasmer.io/App.v0
name: my-sample-site
description: A sample site for demonstration (optional)
package: wasmer/my-sample-site
# Specify environment variables
env:
MY_VAR: "my-value123"
Fields
kind
The kind
field is used to identify the type of configuration file. It is required and is a constant set to wasmer.io/App.v0
.
This constant field might be used in the future to support multiple configuration formats.
name
The name
field is used to identify the name of the application. It is required and must be unique.
- Required:
true
- Required format:
^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
description
The description
field is used to provide a description of the application. It is optional and can be any string.
- Required:
false
package
The package
field is used to specify the name of the package to deploy.
It is required and must specify a package published to the Wasmer registry.
Note: if you have a wasmer.toml in the same directory as the app.yaml
, wasmer deploy
will automatically prompt you to publish a new version of the package.
- Required:
true
env
Specify environment variables for the app. Must be a key-value map.
Example:
env:
MY_VAR: "my-value123"
- Required:
false
debug
The debug
field is used to enable debug mode for the application. This in turn will show detailed error messages if a request fails, instead of a generic error. It is optional and can be any boolean.
- Required:
false
- Default:
false
Sample Configuration
This sample configuration is for a python based flask application.
---
kind: wasmer.io/App.v0
name: wasmer-python-flask-server-myapp-example
package: wasmer/python-flask-server-myapp-example@0.1.0
debug: false
env:
MY_VAR: "my-value123"