@cloudcomponents/cdk-wordpress
TypeScript icon, indicating that this package has built-in type declarations

2.2.0 • Public • Published

cloudcomponents Logo

@cloudcomponents/cdk-wordpress

Build Status cdkdx typescript python

CDK Construct to deploy wordpress

Install

TypeScript/JavaScript:

npm i @cloudcomponents/cdk-wordpress

Python:

pip install cloudcomponents.cdk-wordpress

How to use

import { Wordpress } from '@cloudcomponents/cdk-wordpress';
import { RemovalPolicy, Stack, StackProps, aws_route53 } from 'aws-cdk-lib';
import { Construct } from 'constructs';

export class WordpressStack extends Stack {
  constructor(scope: Construct, id: string, props: StackProps) {
    super(scope, id, props);

    const hostedZone = aws_route53.PublicHostedZone.fromLookup(this, 'HostedZone', {
      domainName: 'cloudcomponents.org',
    });

    new Wordpress(this, 'Wordpress', {
      domainName: 'blog.cloudcomponents.org',
      domainZone: hostedZone,
      removalPolicy: RemovalPolicy.DESTROY,
      offloadStaticContent: true, // Support for plugin e.g. `WP Offload Media for Amazon S3`
    });
  }
}

API Reference

See API.md.

Example

See more complete examples.

License

MIT

Package Sidebar

Install

npm i @cloudcomponents/cdk-wordpress

Weekly Downloads

6

Version

2.2.0

License

MIT

Unpacked Size

1.27 MB

Total Files

17

Last publish

Collaborators

  • hupe1980