Skip to content

Commit bad5c16

Browse files
committed
Add Procfile to use Nginx together with PHP
1 parent 05d5f80 commit bad5c16

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,58 @@ DB_USERNAME=oktetra
256256
DB_PASSWORD=the-postgresql-password
257257
```
258258

259+
## How to store & access files on AWS s3?
260+
261+
- On AWS: Create a s3 bucket and enable it as a Static website hosting, allow all public access and set s3:GetObject Bucket policy, Create an IAM user for api use.
262+
- Laravel .env file, set below variables:
263+
264+
```php
265+
AWS_ACCESS_KEY_ID=
266+
AWS_SECRET_ACCESS_KEY=
267+
AWS_DEFAULT_REGION=
268+
AWS_BUCKET=
269+
FILESYSTEM_DRIVER=s3
270+
AWS_URL=
271+
```
272+
273+
- composer require league/flysystem-aws-s3-v3 ^1.0
274+
- done
275+
276+
## How to install laravel/jetstream or other ui instead of laravel/ui?
277+
278+
```php
279+
// Step 1: Install Laravel to folder cms
280+
composer create-project laravel/laravel cmsjet && cd cmsjet && composer require laravel/jetstream
281+
282+
// Step 2: install jetstream
283+
php artisan jetstream:install inertia && npm install && npm run dev
284+
285+
// Step 3: install CMS in silent mode
286+
composer require alexstack/laravel-cms && php artisan laravelcms --locale=en --table_prefix=jet_ --silent=yes
287+
288+
// Step 4: Edit routes/web.php
289+
- Remove or comment Auth::routes();
290+
- Change Route::get('/' to Route::get('/welcome'
291+
- Run command: php artisan laravelcms --action=clear
292+
293+
// Step 5: Now, you can access your cms backend via http://127.0.0.1:9321/cmsadmin/
294+
// Default admin username: admin@admin.com password: admin321
295+
296+
```
297+
298+
## How to install it on HeroKu?
299+
300+
- Local: First, install at your localhost and make sure everything works fine
301+
- Local: Create a github repository for the laravelcms folder. eg. cd cms && git init && git remote add origin https://github.com/xxx.git
302+
- Local: Enable gd exif for heroku php: composer require ext-exif ext-gd
303+
- On HeroKu: create a new app from this github repository, enable automatically deploy
304+
- HeroKu: add Dyno formation: web vendor/bin/heroku-php-apache2 public/
305+
- HeroKu: add .env variables to settings -> Config Vars
306+
- Local: to use Nginx together with PHP, add a file named Procfile on folder cms with content below:
307+
```php
308+
web: vendor/bin/heroku-php-nginx
309+
```
310+
259311
## License
260312

261313
- The Amila Laravel CMS is open-source software licensed under the MIT license.

0 commit comments

Comments
 (0)