Skip to content

Commit

Permalink
Remove duplicate documentation for Docker in README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
HoraceShmorace committed May 13, 2024
1 parent 484b874 commit 4006317
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
### Follow me on

[![Dev](https://img.shields.io/badge/dev.to-0A0A0A?style=for-the-badge&logo=devdotto&logoColor=white)](https://dev.to/horaceshmorace)
[![Medium](https://img.shields.io/badge/Medium-12100E?style=for-the-badge&logo=medium&logoColor=white)](https://medium.com/@horaceshmorace)
[![LinkedIn](https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge&logo=linkedin&logoColor=white)](https://linkedin.com/in/horaceshmorace)

# Image Flex
A robust, secure, and easily deployable image resizing service that scales, optimizes, and caches images on "the edge," on the fly, built on AWS Serverless technologies. Served by [CloudFront](https://aws.amazon.com/cloudfront/) via an [Origin Access Identity](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-restricting-access-to-s3.html). Executed on [Lambda@Edge](https://aws.amazon.com/lambda/edge/). Backed by [S3](https://aws.amazon.com/s3/). Protected by [AWS WAF](https://docs.aws.amazon.com/waf/latest/developerguide/web-acl.html). Provisioned via [CloudFormation](https://aws.amazon.com/cloudformation/). Built and deployed by the [Serverless Application Model (SAM)](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/what-is-sam.html) CLI.

Expand All @@ -8,18 +14,17 @@ Resized images will be converted to [AVIF](https://caniuse.com/avif) format if t
The original inspiration for this application came from [this AWS blog post](https://aws.amazon.com/blogs/networking-and-content-delivery/resizing-images-with-amazon-cloudfront-lambdaedge-aws-cdn-blog/) I read a few years back. The article intended to provide a [semi-]working example, which was far from being suitable for a production environment.

## IMPORTANT!
While Image-Flex allows you to indicate a region to use other than `us-east-1`, CloudFront requires `us-east-1`. **Until I figure out a workaround, don't attempt to deploy in any region other than `us-east-1`.**
While Image-Flex does technically support setting a region to use other than `us-east-1`, CloudFront requires `us-east-1`. This is an AWS limitation

## Prerequisites
Note that this is a production-ready application, not a tutorial. This document assumes you have some working knowledge of AWS, [CloudFormation](https://aws.amazon.com/cloudformation/) and the [Serverless Application Model (SAM)](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/what-is-sam.html), [AWS Lambda](https://aws.amazon.com/lambda/), [S3](https://aws.amazon.com/s3/), [Node.js](https://nodejs.org/), [NPM](https://www.npmjs.com/), and JavaScript.

## Requirements
1. [Node.js v16.x](https://nodejs.org/en/blog/release/v12.22.1/). It's recommended to use [Node Version Manager](https://github.com/nvm-sh/nvm), which allows one system to install and switch between multiple Node.js versions.
1. [Docker](https://docs.docker.com/engine/install/)
1. [Node.js v16.x](https://github.com/nvm-sh/nvm?tab=readme-ov-file#intro). It's recommended to use [Node Version Manager](https://github.com/nvm-sh/nvm), which allows one system to install and switch between multiple Node.js versions.
1. An [AWS account](https://aws.amazon.com/account/sign-up).
1. The [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/install-macos.html).
1. The [AWS SAM CLI](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install-mac.html).
1. [Docker](https://www.docker.com/) for SAM packaging.
1. [Docker](https://docs.docker.com/engine/install/) for SAM packaging.

Be sure to configure the AWS CLI:
```bash
Expand Down Expand Up @@ -175,7 +180,7 @@ These are generally only called directly when debugging.
```bash
$ npm run build
```
Installs and builds the dependencies for the ***GetOrCreateImage*** Lambda function using a Docker container built on the lambci/lambda:build-nodejs12.x Docker container image.
Installs and builds the dependencies for the ***GetOrCreateImage*** Lambda function using a Docker container built on the lambci/lambda:build-nodejs16.x Docker container image.

### 4. Package
```bash
Expand Down

0 comments on commit 4006317

Please sign in to comment.