Add a custom module to your app
This tutorial will show you how to add your existing code repository to Walhall as a module.
The key requirement is that the module is uploaded as a repository to your GitHub organization. Walhall imports modules directly from GitHub organizations.
Your module must satisfy these technical requirements before you can add it to your Walhall app:
The module repository must contain a Dockerfile that builds an image of the module.
Your module must
EXPOSE its content at port 8080. Example:
# Dockerfile EXPOSE 8080 ENTRYPOINT ["bash", "/code/docker-entrypoint.sh"]
The module repository must have a
.drone.yml file at the root level. You can find a template here.
(Optional) Swagger documentation
Add the module in Walhall
- Log in to Walhall and click on your app.
- In the box labeled Add new module, click Browse.
- A list of modules, derived from your organization’s repositories, will load. If you don’t see your module, then click Refresh the list. If you do, then click the Add button.
- Click Finish selection.
What happens next
The module will be added to your app. However, you must deploy the app again in order for the changes to take effect.
If your app includes BiFrost, then BiFrost will auto-discover the module’s IP address and Swagger file and add the endpoints to your app’s API.
If you’re not using BiFrost, then the module will be assigned its own public URL.