Skip to content

Commit

Permalink
Setup CG deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
droidkfx committed Nov 12, 2023
1 parent 2cce60c commit 6b87d5f
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
site/assets
3 changes: 2 additions & 1 deletion .idea/aws.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,49 @@
# droidkfx.com

The portfolio site for Kyle Brown

## TODO

- [ ] s3 [proxy for api](https://repost.aws/knowledge-center/api-gateway-s3-website-proxy)

## Deployment

Deployment is handled in different ways depending on what you are deploying.

### Frontend

The front end is deployed simply by synchronizing s3 with the front end directory. This can be done with the following
command:

```bash
aws s3 sync ./site s3://www.droidkfx.com --delete
```

### Infrastructure

This application infrastructure is deployed using AWS Cloudformation. The template is located in the `cf` directory.
Check out what deployment would do by running the following command:

```bash
aws cloudformation deploy --template-file cf/droidkfx.com.yaml --stack-name droidkfx-com --capabilities CAPABILITY_IAM --no-execute-changeset
```

This creates a change set that can be reviewed before applying anything. You can see what changes would be made by
running the command it displays after running the above. It will be something like:

```bash
aws cloudformation describe-change-set --change-set-name <ARN>
```

If you are happy with the changes you can use:

```bash
aws cloudformation execute-change-set --change-set-name <ARN>
```

If you are unhappy with them or if you no longer need the change set you can use the following command to delete the
change set:

```bash
aws cloudformation delete-change-set --change-set-name <ARN>
```
10 changes: 10 additions & 0 deletions cf/droidkfx.com.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
AWSTemplateFormatVersion: "2010-09-09"
Description: "Droidkfx.com cloudformation template"
Resources:
SiteContentBucket:
Type: AWS::S3::Bucket
DeletionPolicy: Retain
Properties:
BucketName: "www.droidkfx.com"


1 change: 0 additions & 1 deletion site/.gitignore

This file was deleted.

0 comments on commit 6b87d5f

Please sign in to comment.