Commit Graph

9 Commits

Author SHA1 Message Date
Josh Lee
9f9f18163c
Add AWS Lambda support (#1127)
This adds the lambda-web crate to adapt the actix App to speak to Lambda
by way of the lambda_runtime crate.

AWS Lambda has native support for scripting languages to
execute a function directly; compiled languages must embed a runtime to
fetch incoming events from Lambda and post the responses. This detects
the environment variables to start up in Lambda mode instead of the
normal HTTP server, and is added as an optional feature.

Lambda has five (!) distinct ways of routing HTTP requests to a
function; this supports some of them. (Specifically, the most obvious
way to do this is with a Function URL, which is newest and simplest, and
perhaps with CloudFront, which speaks to the Function URL and not Lambda
directly.)

The error handling could probably be refined, I was just trying to get
this to compile.

(Supported: API Gateway HTTP API with payload format version 2.0; API
Gateway REST API; Lambda function URLs / Not supported: API Gateway HTTP
API with payload format version 1.0; Application Load Balancer)

Necessary for #1102 to be able to run the released packages directly,
and only having to configure the appropriate environment.

---------

Co-authored-by: Yuri Astrakhan <yuriastrakhan@gmail.com>
2024-02-01 18:56:40 +00:00
Yuri Astrakhan
d311888f94
Update Docker build process (#1022)
* Fix docker file builds to use debian
* add a few more things to `.dockerignore`
* remove unused `martin` from docker-compose.yml
* delete unused arm64.Dockerfile

This should also fix #1021
2023-11-23 21:14:32 -05:00
Yuri Astrakhan
ae324100f4 Remove docs/book from ignore (unused) 2023-06-22 23:04:57 -04:00
Yuri Astrakhan
ff29530804
Fix non-deterministic CI tests (#724)
* a race condition due to duplicated webp.mbtiles and webp.pmtiles
* minor cleanup of CI/dockerignore
* dependency bump
2023-06-22 23:01:57 -04:00
Yuri Astrakhan
555a1fccdd
Improve Coverage tooling (#535)
* added manual coverage justfile command
* a lot of small refactorings of config and argument parsing
* feature: support jsonb query param for functions
* cleaned up public/private access
* make all tests populate with a predefined values to avoid issues with
random data
2022-12-27 06:56:27 +00:00
Yuri Astrakhan
68c6259d32
Catch errors in tests, minor fixes (#514)
This extracts some of the code from #511 but without breaking changes

* Use `PathBuf` instead of `String` where dealing with files
* Parse keep_alive as u64
* More config tests to crash if martin output contains warnings or
errors
2022-12-12 09:11:10 -05:00
Yuri Astrakhan
6b114cc7f1
Docker improvements and CI tests (#472)
* Change docker image to use `entrypoint` -- so that Martin can be used
as a command:

```bash
docker run maplibre/martin <parameters>
```

* The docker image is now tested the same way as in the CI tests
* Added a few changes to the justfile

Fixes #436
2022-11-02 19:00:05 +01:00
Yuri Astrakhan
a0a411f088
Consolidate DB init and tests (#463)
* Add justfile to simplify running all the tests
* Save all PBF outputs to the text files
* Consolidate all tests to reuse the same code
* Consolidate database initialization
* updated readme with the new instructions

Note that while this PR creates "expected" files, the CI cannot validate
the generated results because the output is not stable. Eventually we
may try to output just the non-geometry values to have reasonable tests
comparing against the expected results.
2022-10-28 14:52:39 -04:00
Yuri Astrakhan
2c6ad7e906
minor docker fixes (#396)
* ports should be in quotes
* added .dockerignore (copy of .gitignore)
2022-09-13 01:55:26 -04:00