Boost Your Productivity: Single-click Deployments with Genezio’s Enhanced YAML
10 minutes read
Streamline Your Development with Genezio’s Enhanced YAML Configuration
We’re excited to announce a major update to Genezio - the ability to configure and create all your resources using a single genezio.yaml
file. This new feature aims to simplify the deployment process, allowing developers to define functions settings, create databases, set up frontends and enable authentication. In this article, we’ll walk you through the new features and provide practical examples to enable single-click deployments for your projects.
Key Features
Database and Authentication
Seamlessly configure database services, including authentication providers, and connect these services to other parts of the application. In this example, we define a Postgres database and enable email, web3, and Google authentication providers:
services:
databases:
- name: my-postgres
region: us-east-1
authentication:
database:
name: my-postgres
providers:
email: true
web3: true
google:
clientId: ${{ env.GOOGLE_CLIENT_ID }}
clientSecret: ${{ env.GOOGLE_CLIENT_SECRET }}
Support for Expressions
One of the powerful new features of the genezio.yaml
configuration file is the ability to use expressions for dynamically linking different parts of your application. This allows you to reference values from other sections of your configuration file, making it easier to maintain consistency across your project.
For example, in the frontend section, you can dynamically reference backend functions and services using expressions:
frontend:
environment:
VITE_API_URL: ${{ backend.functions.express.url }}
VITE_AUTH_TOKEN: ${{ services.authentication.token }}
VITE_AUTH_REGION: ${{ services.authentication.region }}
scripts:
deploy: npm install
build: npm run build
Support for Environment Variables
In addition to referencing internal configuration values, genezio.yaml
also supports referencing external environment variables, allowing you to securely integrate third-party services like OpenAI.
backend:
environment:
OPENAI_API_KEY: ${{ env.OPENAI_API_KEY }}
In this example, the OPENAI_API_KEY
environment variable in your backend is dynamically set remotely when deploying your application.
Example Workflow
After your genezio.yaml
is configured, simply run:
genezio deploy
Documentation
For a complete list of configuration options and examples, refer to the Genezio documentation.
Genezio will automatically provide the necessary resources, deploy your backend and frontend, and set up databases and authentication as defined in the configuration file.
Conclusion
The genezio.yaml
feature is here to streamline your development process, making it easier to manage all aspects of your app from one place. Whether you’re deploying backend functions, setting up frontend environments, or configuring databases and authentication, this new update brings more power and simplicity to your workflow.
Ready to kickstart your next project? Explore our ready-to-deploy templates and deploy with ease on the Genezio dashboard.
Article contents
Subscribe to our newsletter
Genezio is a serverless platform for building full-stack web and mobile applications in a scalable and cost-efficient way.
Related articles
More from Tutorials
Mastering Automation: A Step-by-Step Guide to Creating a WhatsApp ChatBot with ChatGPT-4o
Cristi Miloiu
Jun 03, 2024
Mastering Automation: A Step-by-Step Guide to Creating a WhatsApp Bot
Cristi Miloiu
May 07, 2024