Sha256: 14161acbaa0f23eb7bf101899eb0240d567c9d1c1d99c2eed618ba303cce5a5d

Contents?: true

Size: 1.39 KB

Versions: 76

Compression:

Stored size: 1.39 KB

Contents

# Example `s3_website` configurations

This document shows examples of complete `s3_website.yml` configurations.

## Minimal

````yaml
s3_id: abcd
s3_secret: 2s+x92
s3_bucket: your.domain.net
````

## Minimal with EC2 AIM roles

````yaml
s3_bucket: your.domain.net
````

If you run `s3_website` on an EC2 instance with IAM roles, it is possible to omit
the `s3_id` and `s3_secret`.

## Optimised for speed

Use CloudFront, gzip, cache headers and greater concurrency:

````yaml
s3_id: <%= ENV['your_domain_net_aws_key'] %>
s3_secret: <%= ENV['your_domain_net_aws_secret'] %>
s3_bucket: your.domain.net
cloudfront_distribution_id: <%= ENV['your_domain_net_cloudfront_distribution_id'] %>
cloudfront_distribution_config:
  default_cache_behavior:
    min_TTL: <%= 60 * 60 * 24 %>
  aliases:
    quantity: 1
    items:
      CNAME: your.domain.net
max_age: 120
gzip: true
````

Above, we store the AWS credentials and the id of the CloudFront distribution as
environment variables. It's convenient, since you can keep the `s3_website.yml`
in a public Git repo, and thus have your deployment configurations
version-controlled.

## Using redirects

````yaml
s3_id: hello
s3_secret: galaxy
redirects:
  index.php: /
  about.php: about.html
routing_rules:
  - condition:
      key_prefix_equals: code/repositories/git/
    redirect:
      host_name: git.johnny.com
      replace_key_prefix_with: ""
      http_redirect_code: 301
````

Version data entries

76 entries across 76 versions & 2 rubygems

Version Path
s3_website_monadic-0.0.22 additional-docs/example-configurations.md
s3_website_monadic-0.0.21 additional-docs/example-configurations.md
s3_website_monadic-0.0.20 additional-docs/example-configurations.md
s3_website_monadic-0.0.19 additional-docs/example-configurations.md
s3_website_monadic-0.0.18 additional-docs/example-configurations.md
s3_website_monadic-0.0.16 additional-docs/example-configurations.md
s3_website_monadic-0.0.15 additional-docs/example-configurations.md
s3_website_monadic-0.0.14 additional-docs/example-configurations.md
s3_website_monadic-0.0.13 additional-docs/example-configurations.md
s3_website_monadic-0.0.12 additional-docs/example-configurations.md
s3_website_monadic-0.0.11 additional-docs/example-configurations.md
s3_website_monadic-0.0.9 additional-docs/example-configurations.md
s3_website_monadic-0.0.8 additional-docs/example-configurations.md
s3_website_monadic-0.0.7 additional-docs/example-configurations.md
s3_website_monadic-0.0.6 additional-docs/example-configurations.md
s3_website_monadic-0.0.5 additional-docs/example-configurations.md
s3_website-1.7.6 additional-docs/example-configurations.md
s3_website_monadic-0.0.4 additional-docs/example-configurations.md
s3_website_monadic-0.0.3 additional-docs/example-configurations.md
s3_website-1.7.5 additional-docs/example-configurations.md