How to deploy an app from a public Git repository

Note: this tutorial uses Github as Git software but the same logic can be applied with any Git software like Bitbucket or Gitlabs. Some menu items can have different names.

The goal of this document: Describe the deployment of a public repository (WordPress in this example) on FlashDrive.

You need :

1/ a FlashDrive.io account
2/ a Github account

Clone the public repository

FlashDrive.io requires language-specific files to be added to a repository before it can be built. Let’s fork the WordPress repository :

WordPress is a PHP app, we need to add an empty composer.json (with {} as contents) file first :

The presence of this composer.json file will inform the builder to select the PHP buildpack when building the app.

Depending on the language of your app you will need to add other language-specific files like packages.json for node apps or requirements.txt for Python app. Visit the language support section related to your app to know more.

Now, let’s create the app on FlashDrive :

Since WordPress requires a MySQL database to run we selected MySQL 8x as a datastore.

Copy the SSH address of your forked repository and the branch name from Github :

and paste it on FlashDrive :

Validate the total cost of the app and click Launch My App.

On the next screen copy the SSH key generated by FlashDrive :

Click Settings > Deploy Keys on Github, click Add Deploy Key and paste the key from FlashDrive :

Then click “Go to App settings” on FlashDrive.

No app is deployed yet because the key was not added to Github when the builder tried to build the app after the app creation sequence was completed. You can see no app is deployed because the “Redeploy from registry” part is empty.

Click Pull and Build to build your app from Github :

Wait for the builder to build your app and visit the URL of your app :

Congratulations, you successfully installed WordPress on FlashDrive!

It’s not the purpose of this tutorial, but to continue the installation of WordPress it’s important to use a block storage solution like S3 to store the content dynamic content you add to your WordPress app (like images). This plugin does it automatically for you.

It’s also important to edit the wp-config.php and uses environment variables as credentials or your blog will be erased each time your app restart on FlashDrive.

Was this helpful?

0 / 0