This is a quick guide on how to deploy Strapi to a Kubernetes cluster in AWS/GCP/DO using Porter. This guide uses PostgresDB by default - to customize your database settings, modify the files in /app/config/env/production in the example repository.
Dockerfile in the root directory.1337, add environment variable NODE_ENV=production, and set resources to the recommended settings (i.e. 2048Mi RAM, 1000 CPU).After the database has been deployed, navigate to the Environment variables tab of your deployed Strapi instance. Configure the following environment variables:
NODE_ENV=production
DATABASE_HOST=
DATABASE_PORT=5432
DATABASE_NAME=
DATABASE_USERNAME=
DATABASE_PASSWORD=
To determine what the correct environment variables are in order to connect to the deployed database, see this guide.
To develop, clone the example repository to your local environment and run npm install && npm run develop; from the app directory. Porter will automatically handle CI/CD and propagate your changes to production on every push to the repository.
Join the Porter Discord community if you have any questions or need help.