Files
strapi-elb/runningnotes.md

68 lines
2.9 KiB
Markdown

create an elb with --single and --database
redeploy with username option set, does it change?
Does strapi work with a databse set in production mode?
SSH into EC2 - check if its using sqlite
deocument that the db has to be done from cli arg, but the configs can be done via files.
SSL? https://levelup.gitconnected.com/beginners-guide-to-aws-beanstalk-using-node-js-d061bb4b8755
Add postgres to strapi
Add the S3 bucket to strapi
If doesnt work, try installing yarn in the ELB instance
Create seperate sql database + VPC rules:
http://blog.blackninjadojo.com/aws/elastic-beanstalk/2019/01/28/adding-a-database-to-your-rails-application-on-elastic-beanstalk-using-rds.html
Tie this in with a cloudformation template + hooking it up
/opt/elasticbeanstalk/node-install/node-v12.16.1-linux-x64/bin
Try setting the database name using cloudformation template
## Running strapi in different modes
You should use development for developing strapi and then deploy it to production.
If you run strapi in production, you cannot edit content types. See this git issue for the thread.
If you're running Strapi in a multiple instance you should:
- Run strapi locally in develop mode.
- Create content types.
- Build strapi in production.
- Push to ELB.
If you're running a single instance, you can alternatively just run it in develop mode in ELB.
Strapi stores its models locally on the instance and not on the database.
<https://github.com/strapi/strapi/issues/4798>
```text
This is not a bug and is intended, as the CTB (Content-Type builder) saves model configurations to files doing so in production would require Strapi to restart and thus could potentially knock your production API offline. Along with the previous reason, strapi is also very much pushed as a scale able application which would mean these changes would not be replicated across any clustered configurations.
There is no current plans to allow for this, as well as no plans to move these model definitions into the database. The enforcement of using the proper environment for the proper task (Production, Staging, and Development) is something that has been pushed from day 1.
Due to the reasons I explained above I am going to mark this as closed but please do feel free to discuss.
```
## Strapi documentation
<https://strapi.io/blog/api-documentation-plugin>
You can install the strapi documentation plugin by running: `npm run strapi install documentation`.
curl -k http://strapi-prod.eu-west-1.elasticbeanstalk.com/tests -H "Authorization: Bearer "
http http://strapi-prod.eu-west-1.elasticbeanstalk.com/auth/local identifier=apiuser password=password
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MiwiaWF0IjoxNTg3ODY3NzQ4LCJleHAiOjE1OTA0NTk3NDh9.McAi1b-F3IT2Mw90652AprEMtknJrW66Aw5FGMBOTj0
http http://strapi-prod.eu-west-1.elasticbeanstalk.com/tests Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MiwiaWF0IjoxNTg3ODY3NzQ4LCJleHAiOjE1OTA0NTk3NDh9.McAi1b-F3IT2Mw90652AprEMtknJrW66Aw5FGMBOTj0"