Skip to content
This repository has been archived by the owner on Mar 27, 2023. It is now read-only.

Commit

Permalink
Refer to alternative project
Browse files Browse the repository at this point in the history
  • Loading branch information
aidansteele committed Mar 19, 2021
1 parent 2e4530d commit 5e27f16
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 27 deletions.
34 changes: 7 additions & 27 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,9 @@
# serverlessish
This project mostly served as a proof-of-concept. It's still functional, but I
would recommend that folks interested in a webservers-on-Lambda experience instead
use [`apparentorder/reweb`][reweb] - it is maintained, has high-quality docs
and many examples.

**tl;dr** Run the _exact same image_ for websites in Lambda as you do in ECS, Kubernetes, etc. Just add this to your
Dockerfile, listen on port 8080 and have a health check returning 200 at `/ping`. **This image will now work in Lambda
and everywhere else and adds less than 2 MB**.
The old README for this project is still available [here][old-readme].

![Dockerfile example](dockerfile.png)

Those lines for copy-paste friendliness:

```Dockerfile
FROM public.ecr.aws/c2t6n2x5/serverlessish:2 AS lh
# FROM ...
COPY --from=lh /opt/extensions/serverlessish /opt/extensions/serverlessish

# optionally add these lines
ENV PORT=9090 # maybe you want a different port
ENV LH_HEALTHCHECK_PATH=/healthcheck # or a different healthcheck path
```

## TODO

More documentation.

**Story time**: Christmas came early in 2020 with the release of [container image support for AWS Lambda][blog]. It
meant that serverless applications could now be packaged in standard Docker images rather than Lambda-specific ZIP
files. Additionally, the 50 MB limit for ZIP files doesn't apply to containers: they can be as enormous as 10 GB.

[blog]: https://aws.amazon.com/blogs/aws/new-for-aws-lambda-container-image-support/
[reweb]: https://github.com/apparentorder/reweb
[old-readme]: /docs/README.old.md
29 changes: 29 additions & 0 deletions docs/README.old.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# serverlessish

**tl;dr** Run the _exact same image_ for websites in Lambda as you do in ECS, Kubernetes, etc. Just add this to your
Dockerfile, listen on port 8080 and have a health check returning 200 at `/ping`. **This image will now work in Lambda
and everywhere else and adds less than 2 MB**.

![Dockerfile example](dockerfile.png)

Those lines for copy-paste friendliness:

```Dockerfile
FROM public.ecr.aws/c2t6n2x5/serverlessish:2 AS lh
# FROM ...
COPY --from=lh /opt/extensions/serverlessish /opt/extensions/serverlessish

# optionally add these lines
ENV PORT=9090 # maybe you want a different port
ENV LH_HEALTHCHECK_PATH=/healthcheck # or a different healthcheck path
```

## TODO

More documentation.

**Story time**: Christmas came early in 2020 with the release of [container image support for AWS Lambda][blog]. It
meant that serverless applications could now be packaged in standard Docker images rather than Lambda-specific ZIP
files. Additionally, the 50 MB limit for ZIP files doesn't apply to containers: they can be as enormous as 10 GB.

[blog]: https://aws.amazon.com/blogs/aws/new-for-aws-lambda-container-image-support/

0 comments on commit 5e27f16

Please sign in to comment.