Applings
Applings is an Iterapp feature which makes it possible to have different apps within one github-repository, and thus let applings also share code.
Say you would like to have an app for frontend and a different app for backend.
This can easily be created by using the applings
-feature. All your code will
live in one repository with one commit log.
Frontend | Backend | |
---|---|---|
Github-repo | github.com/iterate/yourapp | github.com/iterate/yourapp |
Mappe | ~/dev/iterate/yourapp/frontend | ~/dev/iterate/yourapp/backend/ |
URL i test | https://frontend.yourapp.test.iterate.no/ | https://backend.yourapp.test.iterate.no/ |
URL i prod | https://frontend.yourapp.app.iterate.no/ | https://backend.yourapp.app.iterate.no/ |
Applings are independent applications. They can have their own database and their own specific properties. Every time the app is deployed, all applings will be deployed.
V2 | ✨ V3 ✨ |
---|---|
So for instance all changes in all applings within |
So for instance all changes in all applings within |
Examples of what an appling can be:
- An appling for hosting documentation
- An appling as admin-panel
How to create applings?
Create the respective subdirectories where each applings will live. Each appling
will need to have their own iterapp.toml
-file! Then create an
iterapp.toml
-file on the root level with content:
applings = ["appling-a", "appling-b"]
Remember to update your Docker file
The Docker-build is run from the root of the github directory. Remember to update any paths within the dockerfile. Paths will need to be absolute.
See this repo for an example: Dockerfile for testapp-applings/appling-a
FROM nginx:alpine
ADD appling-a/public /usr/share/nginx/html
EXPOSE 80
Testing the build locally
Run the command from the appling-folder you would like to build.
-f "$(pwd)/Dockerfile"
will use the Dockerfile in the current folder.../
will set the build-context to a level up (root-level) to make all applings code available.
docker build -f "$(pwd)/Dockerfile" ../
And if the build is a success, then that should be it. Commit, push, deploy and enjoy!