-
Notifications
You must be signed in to change notification settings - Fork 6
1. Home
Welcome to the Rss2Email wiki!
Read these 2 first!
You have a few options as to how to deploy this project. While you can compile it from source into an executable and run the executable on your VPS, this is not an option for everyone even though this would probably be the easiest solution.
An alternative is doing exactly that but with the extra overhead of building a docker image! Don't worry too much about the image size however as that should be around 4MB in the end thanks to this great post on optimizing Rust docker containers.
If you are planning on building the docker image for use on AWS Lambda then use --build-arg compile_flag="--features aws-lambda"
in your Docker build command.
docker build -t rss2email --build-arg compile_flag="--features aws-lambda" .
This will make sure to compile the project with all the stuff needed to run on AWS Lambda which by default is disabled for ease of running the code locally.
And lastly, I have used Rust's conditional compilation with features to add the necessary boilerplate to run this as an AWS Lambda Function. This is what I am currently using myself. To build/run the code locally including the Lambda stuff just include --features "aws-lambda"
to your cargo command.
I used the lambda_runtime crate but I personally ended up making use of the Dockerfile present in the repo instead of using their way of packaging the app. Check out cargo lambda for information on how to test the project locally.