Git is the most common and simple way to deploy an app on FlashDrive.
FlashDrive supports automatic builds from Github, Gitlab and Bitbucket, and any other git software (included self-hosted versions of Gitlab) using the SSH keys and webhook URL provided.
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.
FlashDrive can only build repositories from your account, fork a public repository to your Git account before proceeding.
This mode is not available for Docker Apps
Select your Git provider when you create your app :
FlashDrive will redirect you to the login page for this provider, accept the permissions required to continue :
Once the app is installed you will be able to choose your repository and your branch from the list. If you need to edit the repositories FlashDrive has access to click on “Configure github access”.
Manual Mode (using SSH Keys)
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