Skip to content

Latest commit

 

History

History
59 lines (39 loc) · 3.92 KB

deployments.md

File metadata and controls

59 lines (39 loc) · 3.92 KB

Deployments

Your Lair is configured with two hosted environments: development and production. While building your tools in WayScript, you are interacting with your Lair’s development environment. Once your tool is ready for use, it can be deployed to your Lair’s production environment.

Both development and production environments use WayScript’s base container image (see Lairs for more details), so tools that have been tested on your development environment will have identical execution without any added configuration required. However, there are a few key operational distinction between development and production environments:

  • Triggers are not invoked in development environments. You must use manual invocations and test events in your Lair’s development environment to test your triggers’ functionality. See Triggers for more details.
  • Files cannot be directly modified in production environments. Please modify files in your Lair’s development environment and then deploy to your production environment. See File system for more details.
  • WayScript will generate different endpoints for your development and production environments. Please ensure you are using the correct endpoint when accessing your tools.

{% hint style="warning" %} To avoid automatic Lair de-deployment, subscribe to a paid plan or make sure to log into your WayScript account at least once every 3 months. {% endhint %}

Deploying your Lair to production environment

Once your tool has been tested with your Lair’s development environment, simply click “Deploy” to setup a production environment.

Accessing your Lair’s production environment

After your first deployment, your production environment can be accessed by selecting <Lair_name>.prod> in the Lair selector menu or by selecting "View Prod" in the Deployments tab of your Lair's toolbar.

{% hint style="warning" %} Your Lair’s production environment is hosted on remote, so it can only be accessed through a network connection. Files from your production environments will also not sync to your local machine when using the WayScript desktop app. {% endhint %}

Using external packages within your hosted environments

External packages can be installed into your Lair’s environments for your tools to access. Packages will be installed in your environments during your Lair’s first process execution and cached for future execution.

{% hint style="info" %} WayScript currently supports Python packages through the pip package manager, but our team is working on supporting other protocols in the near future. {% endhint %}

Python

External packages must be added to a requirements.txt file located at the root level of your Lair directory to persist in your Lair’s hosted environments.

# my-lair-a > requirements.txt
Flask==2.0.1
beautifulsoup4==4.6.3
pandas==0.23.3

If you install packages using your Lair terminal (e.g., through pip install) while testing your tools, you can generate your requirements.txt file using pip freeze.

~/my-lair-a $ pip install pandas
~/my-lair-a $ pip freeze > requirements.txt

{% hint style="warning" %} When using local file sync, you must “Fetch” and “Pull” after using pip freeze to see your requirements.txt file in your Lair’s file system. See File system more details. {% endhint %}