Giter Site home page Giter Site logo

catapulte's Introduction

Hi there πŸ‘‹

Who am I?

My name is Jeremie Drouet, a french πŸ₯– developer.

I'm a πŸ¦€ software engineer @datadog working on Vector.

What I'm working on, on my free time?

  • mrml: a Rust πŸ¦€ rewrite of mjml that boosts performances.
  • git-metrics: a git extension to store metrics related to your project, written in Rust πŸ¦€.

Those projects are motivated by the lack of privacy πŸ‘€ or the carbon footprint of the existing alternatives 🌍.

With the current climate changes, it's the developer's duty to build lightweight and energy efficient softwares.

Rust is really lightweight compared to NodeJS (look at mrml compared to mjml).

Some thoughs

jdrouet's github stats

catapulte's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar github-actions[bot] avatar jdrouet avatar luixal avatar reillysiemens avatar snyk-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

catapulte's Issues

add usage

Update readme to explain how to use the project

Connection refused (os error 111)

I'm getting this when trying to run in Docker:

...
[2021-01-22T18:29:26Z ERROR r2d2] Connection refused (os error 111)
[2021-01-22T18:29:26Z ERROR r2d2] Connection refused (os error 111)
[2021-01-22T18:29:29Z ERROR r2d2] Connection refused (os error 111)
[2021-01-22T18:29:29Z ERROR r2d2] Connection refused (os error 111)
[2021-01-22T18:29:35Z ERROR r2d2] Connection refused (os error 111)
[2021-01-22T18:29:35Z ERROR r2d2] Connection refused (os error 111)
[2021-01-22T18:29:48Z ERROR r2d2] Connection refused (os error 111)
[2021-01-22T18:29:48Z ERROR r2d2] Connection refused (os error 111)
thread 'main' panicked at 'smtp service init: PreconditionFailed("couldn\'t create pool")', src/main.rs:68:41
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Panic in Arbiter thread.

Docker Compose file:

  smtp-server:
    container_name: catapulte
    image: jdrouet/catapulte:latest
    environment:
      - SMTP_HOSTNAME=localhost
      - SMTP_PORT=25
      - SMTP_USERNAME=optional
      - SMTP_PASSWORD=optional
      - TEMPLATE_PROVIDER=local
      - TEMPLATE_ROOT=/templates
    ports:
      - 127.0.0.1:3000:3000
    volumes:
    - ./configs/catapulte/templates:/templates:ro

Is this related to We recommend using Docker if you are on a amd64, i386 or arm64v8 architecture?

My machine: Linux pop-os 5.8.0-7630-generic #32~1609193707~20.10~781bb80-Ubuntu SMP Tue Jan 5 21:29:56 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

Multiple recipient

I want to be able to send an email to multiple emails, in to, cc and bcc

catapulte Issue on Mac M2 Architecture: GLIBC Version Not Found

Similar issues occurs on my ubuntu vm as well

/usr/bin/catapulte: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.32' not found (required by /usr/bin/catapulte)`

Description:

I've been encountering an issue with catapulte on a Mac with M2 architecture. This problem seems to be related to the absence of a specific version of the GNU C Library (GLIBC) required by catapulte. I've noticed similar issues in my own Rust projects, indicating that this might not be isolated to catapulte.

Error Message:

/usr/bin/catapulte: /lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /usr/bin/catapulte)

Steps to Reproduce:

version: '3'

services:
  catapulte:
    image: jdrouet/catapulte:latest
    container_name: catapulte
    environment:
      - SMTP_HOSTNAME=smtp.ethereal.email
      - SMTP_PORT=587
      - [email protected] 
      - SMTP_PASSWORD=nYSncuFYzZ7mMwWRHa
      - SMTP_TLS_ENABLED=false
      - SWAGGER_ENABLED=true
      - TEMPLATE_PROVIDER=local
      - TEMPLATE_ROOT=/templates
    ports:
      - "3000:3000"
    volumes:
      - ./templates:/templates:ro

Expected Behavior:

catapulte should run without encountering the GLIBC_2.32 version not found error.

Actual Behavior:

The application fails to start due to the missing GLIBC_2.32 version.

Additional Context:

This issue does not seem to be specific to catapulte, as I've encountered similar problems in my Rust projects. It appears to be related to the compatibility of certain libraries with the M2 architecture.

Potential Solution:

If I manage to find a workaround or solution, I will update this issue accordingly.

jdrouet/catapulte:master does not exist

The documentation mentions to run the docker image jdrouet/catapulte:master which does not exist. I think actually jdrouet/catapulte:latest is what has been ment.

Pass options to mrml renderer

Mrml can take options like keep_comments and we should be able to pass them to catapulte through variables.
We should also be able to override in the requests.

Missing components in swagger file

Issue Description:

Severity: Low

Description:
When obtaining the Swagger file from http://0.0.0.0:3000/openapi.json and importing it into Swagger Editor, I encountered some errors.

Steps to Reproduce:

  1. Access the Swagger file from http://0.0.0.0:3000/openapi.json.
  2. Copy the contents.
  3. Open Swagger Editor.
  4. Import the Swagger file.

Expected Behavior:
The Swagger file should be imported without any errors.

Actual Behavior:
Encountered errors during the import process.

Additional Information:

  • The version of Swagger Editor used - v3
  • Any specific error messages received
    Reference Error - In: JSON Pointer evaluation failed while evaluating token "super.Recipient" against an ObjectElement at "/components/schemas/super.Recipient"
Screenshot 2024-05-02 at 9 27 22β€―AM

Endpoint fails with (Failed to deserialize) when building the source

Compiled docker image from main:

Then ran the image with this command

docker run -d \
  --name catapulte \
  -e SMTP_HOSTNAME=smtp.ethereal.email \
  -e SMTP_PORT=587 \
  -e [email protected] \
  -e SMTP_PASSWORD=nYSncuFYzZ7mMwWRHa \
  -e SMTP_TLS_ENABLED=false \
  -e SWAGGER_ENABLED=true \
  -e TEMPLATE_PROVIDER=local \
  -e TEMPLATE_ROOT=/templates \
  -p 3000:3000 \
  -v ./template:/templates:ro \
  catapulte:latest

I attached the existing template (not templates) folder

Then when i try curl, i get an error
Failed to deserialize the JSON body into the target type: missing field fromat line 18 column 1%

user-login/metadata.json looks like this. please note there is no from field in the json file

{
  "name": "user-login",
  "description": "Template for login with magic link",
  "template": {
    "path": "user-login/template.mjml"
  },
  "attributes": {
    "type": "object",
    "properties": {
      "token": {
        "type": "string"
      }
    },
    "required": [
      "token"
    ]
  }
}
curl -X POST -v \
  -H "Content-Type: application/json" \
  --data '{
  "name": "user-login",
  "description": "Template for login with magic link",
  "template": {
    "path": "user-login/template.mjml"
  },
  "attributes": {
    "type": "object",
    "properties": {
      "token": {
        "type": "string"
      }
    },
    "required": [
      "token"
    ]
  }
}' \  
  http://localhost:3000/templates/user-login/json
Note: Unnecessary use of -X or --request, POST is already inferred.
*   Trying [::1]:3000...
* Connected to localhost (::1) port 3000
> POST /templates/user-login/json HTTP/1.1
> Host: localhost:3000
> User-Agent: curl/8.4.0
> Accept: */*
> Content-Type: application/json
> Content-Length: 301
> 
< HTTP/1.1 422 Unprocessable Entity
< content-type: text/plain; charset=utf-8
< content-length: 98
< date: Thu, 02 May 2024 17:00:47 GMT
< 
* Connection #0 to host localhost left intact
Failed to deserialize the JSON body into the target type: missing field `from` at line 18 column 1%                                                                                   

Error r2d2 - No compatible auth mechanism

Hi,

When trying out catapulte using docker, I'm getting the following error message:

catapulte_1  | [2021-05-04T11:35:41Z ERROR r2d2] No compatible authentication mechanism was found

I'm using Office365 (smtp.office365.com) as SMTP server with a valid account. It uses STARTTLS for encryption/auth.

Any idea of how to solve this?

Thanks!

Please explain how the Dockerfile works

You have a two stage build in the Dockerfile.

In stage one you copy the template folder to /code/template and run the cargo command.

Then, in stage two, you only copy the binary file to /usr/bin/catapulte.

You set the env variable TEMPLATE_ROOT to /templates.

Of course there is no such /templates folder.

I guess the templates folder from stage one is gone now.

Create a proper logo

For now, there is no logo for this service and I don't have the time nor the skills to do it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.