Concepts
Services
Services allow you to deploy a running application to an environment. This allows you to deploy backends written in FastAPI
, Flask
, or Django
directly to your own cloud. This service will automatically be configured to access all resources in your environment. Meaning there is zero setup to get your application running at any scale.
Create a Service
Services are defined in your launchflow.yaml file. A service will be created once you deploy your application to it with:
1launchflow deploy
List Services
1launchflow services list
Delete a Service
This will delete your service from LaunchFlow and turn down all cloud infrastructure associated with it.
1launchflow services delete \
2 --project <project-name> \
3 --environment <environment-name> \
4 --service <service-name>
You can also run:
1launchflow destroy
To destroy all services and resources in a given environment.
Configuring a Service
If you require special configuration for your service you can specify this in your launchflow.yaml file under service/product_configs. Under product configs you can specify a base
configuration that should be used by all environments and then override this configuration for specific environments.
For example in the below config we specify that all services should deploy to the us-central1
region but for the prod
environment we want to have at least 2 instances up at all time.
1project: gcp-examples
2environment: dev
3services:
4 - name: fastapi-service
5 product: gcp_cloud_run
6 product_configs:
7 base:
8 region: us-central1
9 prod:
10 min_instance_count: 2
Each different product will have different configuration options. For a detailed explanation of all available options refer to our reference documentation.