Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/MasoniteFramework/deploy
Deployment package for Masonite
https://github.com/MasoniteFramework/deploy
Last synced: 27 days ago
JSON representation
Deployment package for Masonite
- Host: GitHub
- URL: https://github.com/MasoniteFramework/deploy
- Owner: MasoniteFramework
- Archived: true
- Created: 2018-07-17T03:08:03.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-18T02:51:17.000Z (almost 6 years ago)
- Last Synced: 2024-05-01T11:22:27.627Z (8 months ago)
- Language: Python
- Size: 14.6 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-masonite - deploy - Deployment package. (Packages / Official Packages)
README
# deploy
Deployment package for Masonite# Instructions
## Heroku CLI Tool
Make sure you have the [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli) tool. This package is simply a wrapper about several commands
## Installation
install the package:
```
$ pip install masonite_deploy
```Then add the Service Provider to your `PROVIDERS` list:
```python
from masonite_heroku.providers import DeployProvider...
PROVIDERS = [
# Framework Providers
AppProvider,
SessionProvider,
RouteProvider,
# 'entry.providers.ApiProvider.ApiProvider',
StatusCodeProvider,
...
# Third Party Providers
DeployProvider, # Here
...
]
```You now have access to several new commands. You can see your command by running `craft` and looking under the `heroku` namespace.
## Setting Up
First you will need to create `Procfile` in the root of your project (where wsgi.py is located) and put this into it:
```
web: gunicorn -w 2 wsgi:application
```Then add `masonite-cli` and `gunicorn` and `psycopg2` (or `psycopg2-binary`) and this package (`masonite_deploy`) to your requirements.txt:
```
waitress==1.1.0
masonite==2.0.11...
masonite_cli
gunicorn
psycopg2-binary
masonite_deploy==0.0.1
```Lastly, commit to your origin master branch.
# Usage
**This package is still in development and you may experience bugs**
## Deployment
If you have everything above configured then we can deploy with a single command:
```
craft heroku:deploy --app nameofapp
```Let the command run and provision your app
## Configs
It's a little annoying to handle configuration files with Heroku if you are used to them being local so you can grab all the configuration variables
in Heroku and add them to a local environment file:```
$ craft heroku:config --get
```This will add all the variables of your heroku app to a `.env.production` file.
You can do the opposite by using:
```
$ craft heroku:config --set
```This will take all the environment variables and set them into Heroku