Skip to content

Commit

Permalink
feat: configure Redis maxmemory policy (closes #2)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelwittig committed Dec 5, 2022
1 parent c3864e5 commit 7f74d55
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 8 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: lint
on: push
permissions:
id-token: write
contents: read
defaults:
run:
shell: bash
jobs:
lint:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: cfn-lint
run: |
pip install cfn-lint==0.72.1
cfn-lint -i W3002 -t mastodon.yaml
8 changes: 8 additions & 0 deletions mastodon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,13 @@ Resources:
Versioning: 'false'
Cors: 'AllowAll'
TemplateURL: './node_modules/@cfn-modules/s3-bucket/module.yml'
CacheParameterGroup:
Type: 'AWS::ElastiCache::ParameterGroup'
Properties:
CacheParameterGroupFamily: 'redis5.0'
Description: !Ref 'AWS::StackName'
Properties:
'maxmemory-policy': 'noeviction'
Cache:
Type: 'AWS::CloudFormation::Stack'
Properties:
Expand All @@ -107,6 +114,7 @@ Resources:
SnapshotName: ''
NumShards: '1'
NumReplicas: '0'
CacheParameterGroupName: !Ref CacheParameterGroup
TemplateURL: './node_modules/@cfn-modules/elasticache-redis/module.yml'
Database:
Type: 'AWS::CloudFormation::Stack'
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"@cfn-modules/cloudwatch-dashboard": "^1.6.0",
"@cfn-modules/ecs-alb-target": "^1.4.0",
"@cfn-modules/ecs-cluster": "^1.1.0",
"@cfn-modules/elasticache-redis": "^1.0.1",
"@cfn-modules/elasticache-redis": "^1.1.0",
"@cfn-modules/fargate-service": "^2.13.0",
"@cfn-modules/kms-key": "^1.2.1",
"@cfn-modules/lb-dns-record": "^1.0.0",
Expand Down

0 comments on commit 7f74d55

Please sign in to comment.