mmajis / plantuml-serverless

Serverless PlantUML diagram rendering
GNU General Public License v3.0
48 stars 22 forks source link

Setting PLANTUML_LIMIT_SIZE #30

Closed karmaniverous closed 1 year ago

karmaniverous commented 1 year ago

I'd like to set the PLANTUML_LIMIT_SIZE environment variable to support larger drawings in accordance with I want to generate huge diagrams! here.

Any idea where in your code I should set that?

mmajis commented 1 year ago

For serverless framework deployments, you could define that in https://github.com/mmajis/plantuml-serverless/blob/master/serverless.yml#L13 like this:

provider:
  environment: 
    PLANTUML_LIMIT_SIZE: 8192

For AWS SAM, it would be https://github.com/mmajis/plantuml-serverless/blob/master/template.yml#L6

Function:
  Environment:
    Variables:
      PLANTUML_LIMIT_SIZE: 8192

Hope that helps!

karmaniverous commented 1 year ago

Thanks for this! Sadly it turns out I have a different problem: my diagram is large enough that the encoded URL is 8000+ characters long. No easy solution there.

I can't for the life of me understand why the official PlantUML server doesn't support POST. Seems like a natural requirement.

For now, though, I'll just have to be content with local rendering. Gotta move on! 👊