Skip to content

Commit 89bdec4

Browse files
committed
#33 Added Heroku deployment to README.md
1 parent 26ecc77 commit 89bdec4

File tree

1 file changed

+48
-1
lines changed

1 file changed

+48
-1
lines changed

README.md

+48-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ composer install --prefer-dist
3232
npm install
3333
```
3434

35-
### Database Setup
35+
### Database setup
3636

3737
Edit `.env.example` according to your environment and save as `.env`.
3838
An application key can be generates with the command `php artisan key:generate`.
@@ -71,6 +71,53 @@ Now you can browse the site [http://localhost:8080](http://localhost:8080).
7171
- NPM
7272
- MySQL
7373

74+
## Heroku deployment
75+
76+
### Unignore some files
77+
78+
You should remove `.env` and `composer.lock` from `.gitignore`.
79+
80+
#### .env
81+
82+
Set up your `.env` file like described in “Database setup” above.
83+
84+
### Heroku buildpacks
85+
86+
You will need to add custom buildpacks for Heroku. Create `.buildpacks` and paste:
87+
88+
```
89+
https://github.com/heroku/heroku-buildpack-php
90+
https://github.com/heroku/heroku-buildpack-nodejs
91+
```
92+
93+
### Procfile
94+
95+
```
96+
web: vendor/bin/heroku-php-apache2 public/
97+
```
98+
99+
### NPM config
100+
101+
Your `package.json` should be changed to this:
102+
103+
```json
104+
{
105+
"private": true,
106+
"devDependencies": {
107+
"gulp": "^3.8.8"
108+
},
109+
"dependencies": {
110+
"laravel-elixir": "^3.0.0",
111+
"gulp": "^3.8.8"
112+
},
113+
"scripts": {
114+
"postinstall": "gulp"
115+
}
116+
}
117+
```
118+
119+
The `scripts` `postinstall` part is the important here, this will generate the resources like JS and CSS files.
120+
74121
Have fun! Any feedback is welcome. Use [Issues](https://github.com/Zemke/starter-laravel-angular/issues) or [Twitter](https://twitter.com/FlorianZemke). My Twitter handle is @FlorianZemke. I’m looking forward to talk to you.
75122

76123
![Laravel](https://cloud.githubusercontent.com/assets/3391981/6683259/2e914726-cc84-11e4-856c-bb26bda733a0.png)

0 commit comments

Comments
 (0)