Git set up at app creation

This article covers the Git connection set up when you create your app on FlashDrive for any supported language. For a detailled git procedure after app deployment please check this article.

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 contains 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 :

Private Repositories

Each time you create a new app and set up 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.

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) :

After app creation, 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 created multiple apps with different branches completely isolated from each others.

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 :

Public Repositories

Public repositories are cloned using the public key created at your account level. There is no Webhooks for public repositories, you will need to request a new pull and build each time you want for FlashDrive to build your app from Github.

Make sure to select “Public” repository, enter the SSH Git Address of the repository and the branch :

To find the Git URL and Branch, go to Github (or equivalent) :

FlashDrive will setup the Git repository and display this page :

As you set up a public repository the key displayed here is a PUBLIC key valid at your account level (for all public repositories). Make sure to use this key ONLY with public Git repositories.

You need to add this key on Github only once. Go to your account settings :

Click on SSH and GPG Keys and a new SSH key :

Continue with your app creation and click “Pull and Build”, FlashDrive will automatically pull the code from Github and deploy your app.

Was this helpful?

0 / 0