Update Readme to add details about setting up s3 📁

This commit is contained in:
Julien Nahum 2023-01-10 15:01:18 +01:00 committed by GitHub
parent 688f2f753e
commit ee6956a5a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -62,7 +62,7 @@ Now, we can configure Laravel. We just need to prepare some vars in our `.env` f
Configure the desired database in the `DATABASE_` section. You can fine tune your installation on the [laravel documentation](https://laravel.com/docs/9.x). Configure the desired database in the `DATABASE_` section. You can fine tune your installation on the [laravel documentation](https://laravel.com/docs/9.x).
Finally, just run these artisan commands and you're done! Run these artisan commands:
```bash ```bash
# Generate needed secrets 🙈 # Generate needed secrets 🙈
@ -72,6 +72,10 @@ php artisan jwt:secret # and select yes!
# Creates DB schemas # Creates DB schemas
php artisan migrate php artisan migrate
``` ```
Now, create an S3 bucket (or equivalent). Create an IAM user with access to this bucket, fill the environment variables: `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_DEFAULT_REGION`, `AWS_BUCKET`. In your AWS bucket permissions, add the following under "Cross-origin resource sharing (CORS)":
```json
[ { "AllowedHeaders": [ "*" ], "AllowedMethods": [ "PUT", "POST", "GET", "DELETE" ], "AllowedOrigins": [ "*" ], "ExposeHeaders": [] } ]
```
🎉 Done! Enjoy your personal OpnForm instance at: [http://opnform.test](http://opnform.test). 🎉 Done! Enjoy your personal OpnForm instance at: [http://opnform.test](http://opnform.test).