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.yaml
file 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:
- Create a
Dockerfile
to build your application and add it to docker-compose.yaml
.
- Add any databases or other services your application depends on to
docker-compose.yaml
.
- 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