Git is the most common and simple way to deploy an app on FlashDrive. The building process from Git can be invoked manually by clicking on “Pull and Build” from an app settings page or automatically when using the Webhook provided by FlashDrive (for private repositories only).
This tutorial is based on Github but the same can be done with any other Git software such as Gitlabs, Bitbucket, etc…
The repository you are using must use the same language as your app settings (Node.js, PHP, Clojure etc…) and must contain the mandatory settings files. Check Language Support for more informations.
There is no FlashDrive-related configuration file required to build your app: FlashDrive will automatically build the image based on the software version you selected and use your configuration files to import all required components.
You can build an app from Github private or public repositories :
Each time you set up a new Git deployment a unique key is generated and must be added inside Git (Github, Gitlab, Bitbucket, etc…) at the Repository level. Do not use keys generated by FlashDrive for private repositories at your account level.
Click on “Setup Git” on your app Settings page :
NoteThis can also be done when you create the app, the process is the same
Make sure to select “Private” repository, enter the SSH Git Address of the repository and the branch :
To find the Git URL and Branch, go to Github (or equivalent) :
Click “Generate Keys” and this screen will appear :
Go back to Github, and click on “Settings” on your repository menu and select Deploy Keys on the left menu :
Click Add deploy key and copy/paste the key provided by FlashDrive. Do not give write access to this key :
Click Add key and the key should now appear on the list :
If you want for FlashDrive to pull and build your code each time you push an update on your code, click on “Webhooks” inside the left menu and add a Webhook :
Copy/Paste the webhook URL provided by FlashDrive and make sure the push event only is selected :
Congratulations! Your private repository is now connected with FlashDrive and, if you added the webhook, your app will build each time you push a new version of your code inside the branch you selected.
You can create multiple apps with different branches completely isolated from each other.
A new button “Pull and Build” will now appear inside your app settings, click it if you want FlashDrive to pull and build a new version of your code from Github :
FlashDrive recently stopped supporting the build of public repositories because most of the time some language-specific files must be added to the repository before it can be built on FlashDrive.
To build a public Git repo on FlashDrive, start by cloning the repo to your Git account and deploy it as a private repository.
Was this helpful?
3 / 0