Fork me on GitHub
#holy-lambda
<
2023-10-26
>
Kanat Mergenbayev04:10:33

Hi guys. Can anyone share basic 1.edn file example for ring handler. I have created rest service with holy-lambda and now trying to compile it and put it into docker. Thank you.

Karol Wójcik06:10:44

What is the reason you need 1.edn? Typically it is used only by GraalVM HL agent.

Kanat Mergenbayev06:10:40

On compile it throws an error.

Karol Wójcik06:10:13

On compile or during creating executable using GraalVM?

Kanat Mergenbayev06:10:49

I am trying to compile/build jar/native image. As I understand I need to provide 1.edn with all routes and queries/body params to test them.

Kanat Mergenbayev06:10:14

I did the same 1.edn but for simple holy lambda without ring.

Karol Wójcik09:10:08

You don’t have to.

Karol Wójcik09:10:39

When using ring you don’t necessarily need 1.edn.

Karol Wójcik09:10:59

You may use agent in-native-context instead. Should be much easier

Kanat Mergenbayev09:10:01

Could you please share an example file or project. With ring can I build native image? thnkx

Kanat Mergenbayev10:10:41

Did you mean? I should fill this one

Kanat Mergenbayev11:10:20

I removed native_conf.clj file and it started building

Kanat Mergenbayev11:10:00

One more question. Usually I create a docker file and push it to ECR. Will it work with native images?

Karol Wójcik12:10:54

Yeah. 👍:skin-tone-6:

Karol Wójcik12:10:40

If you mean docker AWS lambda deployment then yes! But please be aware that native lambda can be deployed as a single zip

Kanat Mergenbayev12:10:12

Yep I know. I was thinking to configure GitHub actions and ci/cd to build and push it to ecr on master merge.

Kanat Mergenbayev12:10:34

But I could not find Dockerfile configuration for native images.