Skip to content

Commit

Permalink
Merge pull request #13 from TrueSparrowSystems/branding_changes
Browse files Browse the repository at this point in the history
Made changes according to branding
  • Loading branch information
sunilkhedar authored Feb 7, 2023
2 parents ab9b407 + 725e8c6 commit 7ff23c8
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion LICENCE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
The MIT License (MIT)
Copyright © 2022 PLG Works
Copyright © 2023 True Sparrow


Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Terraform CDK then utilizes the providers and modules specified to generate terr
It expects to have Route53 configured for the domain where you want to host the Ghost. If you want to use the existing VPC, you need to provide the `subnet ids` to launch the ECS tasks (recommend private subnets) and `public subnet ids` to launch the load balancer (ALB).
2. **Existing Load Balancer**: You can use the existing load balancer (ALB) by providing the `load balancer listener ARN`.
3. **Hosting URL**: It requires a `Ghost hosting url` where Ghost can be accessed on the web.
4. **Static Website**: Refer [this](https://github.com/PLG-Works/ghost-static-website-generator) to host the static website for the generated content. You can also specify `Static website url` where it will provision the AWS S3 bucket to host the static website.
4. **Static Website**: Refer [this](https://github.com/TrueSparrowSystems/ghost-static-website-generator) to host the static website for the generated content. You can also specify `Static website url` where it will provision the AWS S3 bucket to host the static website.
5. **Existing MySQL Database**: The cli requires a MySQL database to store the Ghost configurations along with the content. You can provide the existing DB credentials like DB host, DB name, DB user password, and database name. (otherwise it'll create a new RDS instance).

## Why do I need to use this tool?
Expand All @@ -45,22 +45,22 @@ It comes with the following benefits:

- Install the package:
```bash
npm install -g plg-ghost
npm install -g truesparrow-ghost
```
- Deploy Ghost Stack and Backend Stack:
```bash
plg-ghost deploy
truesparrow-ghost deploy
```

- Destroy Ghost and Backend Stack:
```bash
plg-ghost destroy
truesparrow-ghost destroy
```

## Development:
- Clone the repository:
```bash
git clone [email protected]:PLG-Works/ghost-hosting-cli.git
git clone [email protected]:TrueSparrowSystems/ghost-hosting-cli.git
```
- Install all dependencies:
```bash
Expand All @@ -85,4 +85,4 @@ It comes with the following benefits:
npm run dev -- destroy
```

> While executing **deploy**/**destroy** command, you might get timeout exceptions because of network interruptions. If that is the case, then re-run the command to complete the execution.
> While executing **deploy**/**destroy** command, you might get timeout exceptions because of network interruptions. If that is the case, then re-run the command to complete the execution.
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "plg-ghost",
"name": "truesparrow-ghost",
"version": "1.0.0",
"description": "Host Ghost server in AWS ECS and provision to host static files on AWS S3",
"main": "./dist/src/run.js",
Expand All @@ -23,7 +23,7 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/PLG-Works/ghost-hosting-cli.git"
"url": "git+https://github.com/TrueSparrowSystems/ghost-hosting-cli.git"
},
"keywords": [
"ghost",
Expand All @@ -33,12 +33,12 @@
"cdktf",
"devops"
],
"author": "PLG Works",
"author": "True Sparrow",
"license": "MIT",
"bugs": {
"url": "https://github.com/PLG-Works/ghost-hosting-cli/issues"
"url": "https://github.com/TrueSparrowSystems/ghost-hosting-cli/issues"
},
"homepage": "https://github.com/PLG-Works/ghost-hosting-cli#readme",
"homepage": "https://github.com/TrueSparrowSystems/ghost-hosting-cli#readme",
"dependencies": {
"@cdktf/provider-aws": "8.0.12",
"cdktf": "0.11.2",
Expand Down Expand Up @@ -69,6 +69,6 @@
"dist/**/*"
],
"bin": {
"plg-ghost": "./dist/src/run.js"
"truesparrow-ghost": "./dist/src/run.js"
}
}
10 changes: 5 additions & 5 deletions src/config/common.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"ghostStackName": "ghost",
"backendStackName": "backend",
"nameLabel": "PLG Ghost Test",
"nameIdentifier": "plg-ghost",
"nameLabel": "True Sparrow Ghost Test",
"nameIdentifier": "truesparrow-ghost",
"configFile": "config.json",
"outputFile": "output.json",
"tfStateBucketName": "plg-ghost-tf-state",
"tfStateBucketName": "truesparrow-ghost-tf-state",
"tfStateBucketKey": "meta/ghost.tfstate",
"tfStateBucketLockDdbTableName": "plg-ghost-tf-state-locking",
"tfStateBucketLockDdbTableName": "truesparrow-ghost-tf-state-locking",
"tags": {
"Name": "PLG Ghost"
"Name": "True Sparrow Ghost"
}
}
4 changes: 2 additions & 2 deletions src/config/ecs.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"nginxContainerPort": 8080,
"autoScalingMinCapacity": 2,
"autoScalingMaxCapacity": 10,
"logGroupName": "plg/ghost",
"logGroupName": "truesparrow/ghost",

"logStreamPrefix": "ecs",
"taskDefinition": {
Expand All @@ -14,7 +14,7 @@
},
"ghostImageUri": "public.ecr.aws/j0d2y7t1/ghost:5.7.0-alpine",
"nginxImageUri": "public.ecr.aws/j0d2y7t1/nginx:1.23.1",
"clusterName": "plg-ghost",
"clusterName": "truesparrow-ghost",
"amazonECSTaskExecutionRolePolicy": "arn:aws:iam::aws:policy/service-role/AmazonECSTaskExecutionRolePolicy",
"amazonEC2ContainerServiceAutoscaleRole": "arn:aws:iam::aws:policy/service-role/AmazonEC2ContainerServiceAutoscaleRole"
}
6 changes: 3 additions & 3 deletions src/config/s3.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"configsS3BucketName": "plg-ghost-configs",
"blogContentS3BucketName": "plg-ghost-blog-assets",
"blogStaticS3BucketName": "plg-ghost-static-assets"
"configsS3BucketName": "truesparrow-ghost-configs",
"blogContentS3BucketName": "truesparrow-ghost-blog-assets",
"blogStaticS3BucketName": "truesparrow-ghost-static-assets"
}
6 changes: 3 additions & 3 deletions src/driver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,9 @@ function _readAndShowOutput(): any {
function _formatOutput(output: any): any {
const responseData = {};

const plgGhostOutputHash = output[commonConfig.ghostStackName];
Object.keys(plgGhostOutputHash).forEach(function (key) {
const value = plgGhostOutputHash[key];
const tsGhostOutputHash = output[commonConfig.ghostStackName];
Object.keys(tsGhostOutputHash).forEach(function (key) {
const value = tsGhostOutputHash[key];

const extractedKey = key.substring(0, key.length - 9); // 8 char random string with '_'

Expand Down
4 changes: 2 additions & 2 deletions src/terraform/ghost/cloudfront.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class CloudfrontResource extends Resource {
*/
_createOriginAccessIdentity() {
return new CloudfrontOriginAccessIdentity(this, 'origin_access_identity', {
comment: 'PLG Ghost blog',
comment: 'True Sparrow Ghost blog',
});
}

Expand Down Expand Up @@ -140,7 +140,7 @@ class CloudfrontResource extends Resource {
],
enabled: true,
isIpv6Enabled: true,
comment: 'PLG Ghost blog',
comment: 'True Sparrow Ghost blog',
defaultCacheBehavior: {
allowedMethods: ['GET', 'HEAD', 'OPTIONS'],
cachedMethods: ['GET', 'HEAD'],
Expand Down

0 comments on commit 7ff23c8

Please sign in to comment.