How to Get Started with Ergomake: A Guide to Preview Environments

Aug 18, 2024 | Programming

If you’re looking for a streamlined way to run preview environments on every pull request, regardless of the stack you’re using, you’re in the right place! Although the Ergomake project is no longer actively maintained, it offers an ingenious solution for developers. Let’s explore how to harness its power and what to do if you encounter any bumps along the way.

What is Ergomake?

Ergomake is a clever tool that spins up your entire application every time you open a pull request, providing you with a preview link to see the changes live. Picture it like an automated chef who prepares a fresh dish each time you ask for a meal, allowing you to taste and judge before it goes to the main menu. It supports multi-repo projects and containerized applications effortlessly.

Getting Started

To embark on your Ergomake journey, follow these easy steps:

  1. Log into Ergomake.
  2. Select the desired organization and click the “Add Repo” button.
  3. During the installation process, you’ll be prompted to grant access to the repository for which you wish to generate previews. Ensure you select all required repositories, as Ergomake cannot generate previews without access.
  4. Create a docker-compose.yml file in your repository’s .ergomake folder (located in the repository’s root). Ergomake will use this configuration to generate the preview environments.
  5. version: 3.8
    services:
      web:
        build: ..
        ports:
          - 8080:8080
      api:
        build: .../my-backend-repo
        ports:
          - 3001:3001
      database:
        image: mongo
        environment:
          MONGODB_INITDB_ROOT_USERNAME: username
          MONGODB_INITDB_ROOT_PASSWORD: password
    
  6. Open a pull request and wait for the Ergomake bot’s comment. This will contain a link to all applications running within your preview environment!

Troubleshooting Tips

While Ergomake is a powerful tool, you may encounter challenges. Here are a few troubleshooting steps:

  • Missing Preview Links: Ensure that all required repositories are selected during access permission. If Ergomake doesn’t have visibility, it cannot generate the previews.
  • Error in docker-compose.yml: Review your configuration for any syntax errors. Always check indentation and formatting.
  • Pull Request Not Triggering Preview: Confirm your repository settings to make sure Ergomake is set up correctly to listen for pull request events.

For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.

Community Support

You can find Ergomake’s users and maintainers on GitHub Discussions, where questions about setup and roadmaps are welcomed. For faster responses, visit our Discord server.

Wrap Up

At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

Stay Informed with the Newest F(x) Insights and Blogs

Tech News and Blog Highlights, Straight to Your Inbox