Skip to content

Commit

Permalink
Adding pull through cache for ghcr.io
Browse files Browse the repository at this point in the history
  • Loading branch information
andreaswittig committed Feb 9, 2024
1 parent 3ea1e5f commit ede3a01
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions mastodon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ Resources:
EngineVersion: '14.5'
TemplateURL: './node_modules/@cfn-modules/rds-postgres/module.yml'
Cluster:
DependsOn: GitHubPullThroughCacheRule
Type: 'AWS::CloudFormation::Stack'
Properties:
Parameters:
Expand All @@ -159,7 +160,7 @@ Resources:
AlertingModule: !GetAtt 'Alerting.Outputs.StackName'
ClientSgModule1: !GetAtt 'ClientSg.Outputs.StackName'
ManagedPolicyArns: !Ref S3Policy
AppImage: 'ghcr.io/mastodon/mastodon:v4.2.5'
AppImage: !Sub '${AWS::AccountId}.dkr.ecr.${AWS::Region}.amazonaws.com/github/mastodon:v4.2.5'
AppCommand: 'bash,-c,bundle exec rails db:migrate && bundle exec rails s -p 3000'
AppPort: '3000'
AppEnvironment1Key: 'LOCAL_DOMAIN'
Expand Down Expand Up @@ -232,7 +233,7 @@ Resources:
AlertingModule: !GetAtt 'Alerting.Outputs.StackName'
ClientSgModule1: !GetAtt 'ClientSg.Outputs.StackName'
ManagedPolicyArns: !Ref S3Policy
AppImage: 'ghcr.io/mastodon/mastodon:v4.2.5'
AppImage: !Sub '${AWS::AccountId}.dkr.ecr.${AWS::Region}.amazonaws.com/github/mastodon:v4.2.5'
AppCommand: 'bash,-c,node ./streaming'
AppPort: '4000'
AppEnvironment1Key: 'LOCAL_DOMAIN'
Expand Down Expand Up @@ -304,7 +305,7 @@ Resources:
AlertingModule: !GetAtt 'Alerting.Outputs.StackName'
ClientSgModule1: !GetAtt 'ClientSg.Outputs.StackName'
ManagedPolicyArns: !Ref S3Policy
AppImage: 'ghcr.io/mastodon/mastodon:v4.2.5'
AppImage: !Sub '${AWS::AccountId}.dkr.ecr.${AWS::Region}.amazonaws.com/github/mastodon:v4.2.5'
AppCommand: 'bash,-c,bundle exec sidekiq'
AppEnvironment1Key: 'LOCAL_DOMAIN'
AppEnvironment1Value: !Ref DomainName
Expand Down Expand Up @@ -375,7 +376,7 @@ Resources:
AlertingModule: !GetAtt 'Alerting.Outputs.StackName'
ClientSgModule1: !GetAtt 'ClientSg.Outputs.StackName'
ManagedPolicyArns: !Ref S3Policy
AppImage: 'ghcr.io/mastodon/mastodon:v4.2.5'
AppImage: !Sub '${AWS::AccountId}.dkr.ecr.${AWS::Region}.amazonaws.com/github/mastodon:v4.2.5'
AppCommand: 'bash,-c,RAILS_ENV=production bin/tootctl media remove && RAILS_ENV=production bin/tootctl preview_cards remove'
AppEnvironment1Key: 'LOCAL_DOMAIN'
AppEnvironment1Value: !Ref DomainName
Expand Down Expand Up @@ -656,3 +657,8 @@ Resources:
SecretAccessKey: !GetAtt 'EmailUserAccessKey.SecretAccessKey'
Region: !Ref 'AWS::Region'
ServiceToken: !GetAtt 'SmtpPasswordConverterLamdaFunction.Arn'
GitHubPullThroughCacheRule:
Type: AWS::ECR::PullThroughCacheRule
Properties:
EcrRepositoryPrefix: 'github'
UpstreamRegistryUrl: 'ghcr.io'

0 comments on commit ede3a01

Please sign in to comment.