Lyrid's Deployment Configuration
Lyrid's deployment is configured by setting the .lyrid-definition.yml situated at the root of your repository. It is how Lyrid's platform recognizes how to package, build, and run your code within Lyrid.
Lyrid Definition Breakdown
name: <Application Name>
description: <Application Description>
ignoreFiles: <Files to Ignore>
modules:
- name: <Module Name>
language: <Language Name>
web: <Framework Name>
description: <Module description>
functions:
- name: <Function Name>
entry: <Entrypoint>
description: <Function Description>
Application Name (required)
The name of your application or project, this is up to you.
- Your application name is unique to your account, deploying two different services with the same application name would cause the previous application to be replaced.
Application Description
File to Ignore (required)
Example
ignoreFiles: .env node_modules
Will ignore the .env files and the directory node_modules
projectRoot
|_ .env --- IGNORED
|_ node_modules --- IGNORED
|_ etc --- IGNORED
|_ ... --- IGNORED
|_ .yarn.lock
- Ignore build files and package installations before deploying
Module Name (required)
The name to define your module, this is up to you. The user will be able to create more function entry points into the module using this definition. Only function that is listed inside this definition is the one that will be wrapped by the platform into Lyrid Function.
- Your module name is unique to your application in your account, deploying two different modules within the same application name would cause the previous module in your application to be replaced.
Language Name (required)
- nodejs18.x
- nodejs16.x
- nodejs14.x
- nodejs12.x
- php8.2
- dotnetcore3.1
- dotnetcore5.0
- dotnetcore7.0
- go1.x
- python3.10
- python3.9
- python3.8
- Some combinations of Language and Framework may not be available, in which case you should refer to Deployment with Docker.
- For existing combinations, refer to the templates in LyridInc's Github
Framework Name (required)
- analog.standalone
- apache
- asp
- chi
- django
- express
- flask
- gatsbyjs
- gin
- hydrogen
- next.standalone
- nextjs
- nocodb
- nuxt3
- nuxtjs
- docker
This can be optional for some services which do not use a library.
- Some combinations of Language and Framework may not be available, in which case you should refer to Deployment with Docker.
- For existing combinations, refer to the templates in LyridInc's Github
Module Description
The description of your module or project, this is up to you.
Entrypoint
The entry / main file containing the main function for your code. This is the location that will be the wrapped by the platform to create a Lyrid Function.
This may not matter in some frameworks such as Next.js, Nuxt.js, ...etc
Function Description
File Structure
Some combinations of languages or frameworks would require following a certain schema:
- Go
- Python
- NodeJS (Express)
- C#
<AppName>.<ModuleName>
│ .env << Environment Variable
│ .lyrid-definition.yml << Module Definition
│ go.mod
│ main.go << Main
│
└───<FunctionName>
entry.go << Entry Function
<AppName>.<ModuleName>
│ .env << Environment Variable
│ .lyrid-definition.yml << Module Definition
│ main.py << Main
│ requirements.txt
│ __init__.py
│
└───<FunctionName>
entry.py << Entry Function
__init__.py
<AppName>.<ModuleName>
│ .env << Environment Variable
│ .lyrid-definition.yml << Module Definition
│ index.js << Main
│ package.json
│
└───src
└───<FunctionName>
entry.js << Entry Function
index.js
<AppName>.<ModuleName>
│ .env << Environment Variable
│ .lyrid-definition.yml << Module Definition
│ DotNetApp.DotNetModule.csproj
│ Program.cs << Main
│
└───DotNetFunction
entry.cs << Entry Function
Entry Function
Entry function is the location that will be the wrapped by the platform to create a Lyrid Function.
For the languages/frameworks that follow the schema above, ensure that the names in .lyrid-definition.yml
match the names in the given file structure.