https://github.com/cnunciato/pulumi-strapi
An example that deploys Strapi headless CMS as a containerized web app on AWS with Pulumi.
https://github.com/cnunciato/pulumi-strapi
aws pulumi strapi
Last synced: about 1 year ago
JSON representation
An example that deploys Strapi headless CMS as a containerized web app on AWS with Pulumi.
- Host: GitHub
- URL: https://github.com/cnunciato/pulumi-strapi
- Owner: cnunciato
- License: mit
- Created: 2023-03-18T14:34:04.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-11-09T00:23:17.000Z (over 2 years ago)
- Last Synced: 2024-10-20T06:29:41.403Z (almost 2 years ago)
- Topics: aws, pulumi, strapi
- Language: TypeScript
- Homepage:
- Size: 272 KB
- Stars: 6
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pulumi-strapi
An example that deploys [Strapi CMS](https://strapi.io/) as a containerized web app on AWS with [Pulumi](https://www.pulumi.com/).
* Deploys in a [VPC](https://aws.amazon.com/vpc/) (with public and private subnets) with [ECS Fargate](https://aws.amazon.com/fargate/) and [Elastic Load Balancing](https://aws.amazon.com/elasticloadbalancing/)
* Forwards logs to [CloudWatch](https://aws.amazon.com/cloudwatch/), streams CloudWatch logs to your terminal
* Supports both [RDS](https://aws.amazon.com/rds/) MySQL and PostgreSQL (with MySQL as the default)
* Stores your media (e.g., Strapi uploads) with [Amazon EFS](https://aws.amazon.com/efs/)
* Supports custom domains and SSL certs with [Route 53](https://aws.amazon.com/route53/) and [ACM](https://aws.amazon.com/certificate-manager/)
* Deploy from your laptop, in CI (e.g., GitHub Actions), or with [Pulumi Deployments](https://www.pulumi.com/product/pulumi-deployments/)
* Everything written in TypeScript
More docs to come! 🚀
## Deploy your own
```bash
pulumi new https://github.com/cnunciato/pulumi-strapi
```
[](https://app.pulumi.com/new?template=https://github.com/cnunciato/pulumi-strapi)
## Handy local commands
```bash
# Install Strapi and Pulumi dependencies.
make ensure
# Develop locally -- build content types, etc. -- using the SQLite backend.
make serve
# Create a new Pulumi stack (e.g., `dev`).
make new-stack
# Deploy!
make deploy
# Browse to your newly deployed Strapi CMS.
make browse
# Stream CloudWatch logs to your terminal.
make logs
# When you're done, tear everything down.
make destroy
```
See the `Makefile` for details.
## Pulumi configuration settings
All configuration settings are optional.
| Key | Type | Example | Default |
| --- | ---- | ------- | ------- |
| `aws:region` | `string` | `us-west-2` | `us-west-2` |
| `dbName` | `string` | `strapi` | `strapi` |
| `dbUsername` | `string` | `strapi` | `strapi` |
| `dbType` | `string` | `mysql` | `mysql` |
| `dbInstanceClass` | `string` | `db.t3.micro` | `db.t3.micro` |
| `dbStorage` | `number` | `20` | `20` |
| `dbPassword` | `string` |`StrongPass1` | [`new random.RandomPassword()`](https://www.pulumi.com/registry/packages/random/api-docs/randompassword/) |
| `appPort` | `number` | `1337` | `1337` |
| `appCPU` | `number` | `2048` | `2048` |
| `appMemory` | `number` | `4096` | `4096` |
| `appUploadsPath` | `string` | `public/uploads` | `public/uploads` |
| `subdomain` | `string` | `my-cms` | None |
| `domain` | `string` | `example.com` | None |
| `tags` | `object` | `{ owner: "yourname" }` | None |