Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed #10062: Added Support for Heroku Deployments #10063

Merged
merged 6 commits into from
Sep 11, 2021
Merged

Fixed #10062: Added Support for Heroku Deployments #10063

merged 6 commits into from
Sep 11, 2021

Conversation

jasonspriggs
Copy link
Contributor

@jasonspriggs jasonspriggs commented Sep 9, 2021

Description

This PR adds support for Heroku one-click deployments directly from the GitHub Readme page of the application. This also unlocks the ability for developers to test changes inside of Heroku using automatic deploys of their own fork, allowing for faster iteration of a production like containerized environment. This PR only focuses on the core functionality of the application deployment and has not been fully tested to ensure point-for-point compatibility with all functionality of a standard installation of Snipe-IT.

This PR does make use of a number of Heroku add-ons, all with Free tiers to help offload some of the background processes:

  • ClearDB for MySQL DB Hosting
  • Heroku Redis for Redis Session Management Hosting
  • Papertrail Logs for Log Aggregation and Analytics

The defaults for each of these add-ons are set to use the Free tier available. Upgrades may be necessary to enable functionality available for making the application production-ready. My intention would be to include a guide of this in the documentation once this PR is accepted.

I've similarly added in support for JawsDB MySQL + Maria DB Hosting as well for users that may wish to use that provider.

The files added at the root of the repo are app.json (a file describing all of the environment variables, add-ons, and other various application settings that are needed to get everything going), a Procfile (the command run to start and run the container), and the heroku/startup.php file (used to populate/parse out some environment variables that are necessary to run the application).

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

The Deploy to Heroku button located on my develop branch's README.md prompts the user for the most common environment variables and stands up a working copy of Snipe-IT once those variables are filled in.

Test Configuration:

  • PHP version: 7.4.23
  • MySQL version: (depends on upstream add-on provider)
  • Webserver version: 2.4.48
  • OS version: Heroku-20 PHP Buildpack

Checklist:

@jasonspriggs
Copy link
Contributor Author

jasonspriggs commented Sep 9, 2021

I have a test instance of this running at https://snipeit-dev.herokuapp.com/ - Feel free to DM me for a set of credentials to access, or if you'd like to get a Heroku account stood up, feel free to attempt deployment and let me know any feedback. I can similarly give any details needed to test this.

I will note I'm currently adding one additional add-on for S3 file storage. Because Heroku does not have a persistent file storage mechanism, files currently disappear after dyno (container) restart.

@snipe snipe changed the title Added #10062: Add Support for Heroku Deployments Fixed #10062: Added Support for Heroku Deployments Sep 11, 2021
@snipe snipe merged commit 0d63368 into snipe:develop Sep 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants