Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce pull request previews #4

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Introduce pull request previews #4

wants to merge 1 commit into from

Conversation

ergomake[bot]
Copy link

@ergomake ergomake bot commented Jul 18, 2023

Summary

These changes include a template for setting up pull request previews.

After you adjust this configuration file, Ergomake will create a preview environment whenever developers create a pull-request. Once the preview environment is up, Ergomake will post a link to access it.

How it works

The docker-compose.yaml file within .ergomake contains the configurations necessary to spin up an environment. Whenever this file exists in a pull-request, we'll use it to spin up a preview.

Please update this docker-compose.yamlfile by pushing more code to this branch (ergomake). Once it works fine, you should have a working preview link.

Here are the most common actions you may need to take:

  1. Create a Dockerfile to build your application and add it to docker-compose.yaml.
  2. Add any databases or other services your application depends on to docker-compose.yaml.
  3. Add environment variables by logging into the dashboard and selecting this repository.

For more information, please see our documentation.

Tips for writing your compose file

  • You can see the build logs for your services in the dashboard.
  • Make the first service your front-end application. This will be the service whose link comes first in our comment.
  • Expose your applications by binding their desired ports to localhost. To expose port 3000, for example, you can use 3000:3000.
  • Avoid unnecessary complications, like using depends_on,volumes, and networks.
  • To seed your database, we recommend that you create a docker image with a seed. To learn how to do that, access Docker Hub and see the documentation there for the Mongo and Postgres images.

Where to go from here

In our platform, you can configure branches to be permanently deployed. That way, you can access that branch at any time, regardless of whether there's a PR with its contents. Permanent branches are useful for permanent staging, QA, or development environments.


💻 GitHub | 🌐 Discord | 🐦 Twitter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants