This repository has been archived by the owner on Mar 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2e4530d
commit 5e27f16
Showing
2 changed files
with
36 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ |