To set up a database or any other pieces of third-party software, you just need to add them to the sameDocumentation Index
Fetch the complete documentation index at: https://docs.ergomake.dev/llms.txt
Use this file to discover all available pages before exploring further.
docker-compose.yml you’re using for Ergomake environments.
These pieces of third-party software are usually available on Docker Hub images already. Therefore, you can just tell Docker Compose to pull them and fill the necessary environment variables.
To learn how to seed your databases, see Seeding
Databases.
docker-compose.yml file, you can run docker-compose up to ensure your application works on your machine. If it does, you’re ready to commit your docker-compose.yml file and start using preview environments. Remember: whatever you can run locally with Docker Compose, you can also run on the cloud.
Now, whenever you open a pull-request, Ergomake will spin-up a cloud environment that’s just like your local one. Then, the Ergomake Bot will add a comment to your pull-request containing a link to that environment.
From there on, you can already cURL your API using the URL sent by the Ergomake Bot or connect a local front-end app to it, for example.
Public and private services
To expose an application to the internet in your preview environment, you must bind the container’s target port to alocalhost port, just as you’d do with a local docker-compose.yml.
Once you do that, Ergomake will always expose the first bound port in your service’s ports attribute.
In the example above, our back-end’s port 3001 is publicly accessible because it’s the first bound port for the backend service. On the other hand, that MongoDB instance isn’t exposed to the internet.
To expose your MongoDB instance to the world, bind the container’s 27017 port to a localhost port, as shown below.

