Strapi comes with a full featured Command Line Interface (CLI) which lets you scaffold and manage your project in seconds.
Start your Strapi application with autoReload enabled. Learn more
npm run develop
# or
yarn develop
Start your Strapi application with autoReload disabled. Learn more
npm run start
# or
yarn start
Build your admin panel. Learn more
npm run build
# or
yarn build
Strapi gives you many possible deployment options for your project. Find the one that suits you on the deployment section of the documentation.
As of Nov 2023 All work is being done on the master branch until further notice. Anywhere that is says staging is to be replaced with master.
- Note: Check if there has been any new changes on the branch you will be deploying. If so pull in the latest changes for the branch you will be deploying (should always be staging)
- Note: If new changes, merge them into your local working branch.
- Build and test API locally.
- Once tested and approved push up your changes.
- Create a PR and tag team members for review.
- Once PR is approved, team members will tag you so that you can merge it and complete the deployment. (This step is nesseccary to make sure everyone working on the API can also access it and redeploy it)
- SSH into server (If you do not have a private key file, reach out to your manager for assistance)
- Make sure the newest changes were pushed from github, if not pull them in manually.
- From ~ run: pm2 restart ecosystem.config.js
- NOTE: To check status of restart run: pm2 logs
- The API should now be rebuilt with the newest changes
- Resource center - Strapi resource center.
- Strapi documentation - Official Strapi documentation.
- Strapi tutorials - List of tutorials made by the core team and the community.
- Strapi blog - Official Strapi blog containing articles made by the Strapi team and the community.
- Changelog - Find out about the Strapi product updates, new features and general improvements.
Feel free to check out the Strapi GitHub repository. Your feedback and contributions are welcome!
Setting up A Postgres Database on Mac (Quick and easy set up using Postgres App) https://postgresapp.com/downloads.html
- Download package
- Choose initialize from within the app
- Make note of your database information (port, name, username, and password)
(Commands that may be useful once you are in the psql cli)
* \list or \l: list all databases
* \c <db name>: connect to a certain database
* \dt: list all tables in the current database using your search_path
* \dt *.: list all tables in the current database regardless your search_path
- Clone repo
- npm install
- Create a .env file and add the following
HOST=0.0.0.0
PORT=1337
APP_KEYS=your api key
JWT_SECRET=your jws secret
TRANSFER_TOKEN_SALT=your api token salt
DATABASE_HOST=
DATABASE_PORT=
DATABASE_NAME=
DATABASE_USERNAME=
DATABASE_PASSWORD=
DATABASE_SSL=false
(Make sure db host, port, name, username, and password match your settings previously created in your local psql db creation)
- npm run develop
- Visit on localhost:1337
- Pull in the db From the production site info coming soon
As of Nov 2023 All work is being done on the master branch until further notice. Anywhere that is says staging is to be replaced with master.
- Make sure you pull down all the latest code (staging). (Crucial)
- Note: (If the production data is needed) Transfer data from remote instance to your local instance
-
- In a new terminal window, navigate to the root directory of the destination instance.
-
- npm run strapi transfer -- --from remoteURL
-
- Add the transfer token when prompted to do so.
-
- Answer Yes or No to the CLI prompt: "The transfer will delete all of the local Strapi assets and its database. Are you sure you want to proceed?".
- Create a new branch for development (should be linked to a github issue)
- Once task is completed and tested push up the branch and create a PR to staging and tag team mates for review.
- For deployment see "RENCI Deployment" section.
To restore a DB instance from a DB snapshot https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_RestoreFromSnapshot.html
- Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/.
- In the navigation pane, choose Snapshots.
- Choose the DB snapshot that you want to restore from.
- For Actions, choose Restore snapshot.
- On the Restore snapshot page, for DB instance identifier, enter the name for your restored DB instance.
- Specify other settings, such as allocated storage size.
- For information about each setting, see Settings for DB instances.
- Choose Restore DB instance.
- Take note of the new endpoint which can be found in Connectivity & Security in RDS
- SSH into the server
- Open up ecosystem.config.js and change the value for DATABASE_HOST to the new endpoint.
- Save
- RUN pm2 restart ecosystem.config.js