Skip to content

RicardoGaefke/ricardogaefke-pdf

Repository files navigation

ricardogaefke-pdf

Example of WebJobs for PDF creation.

Build status Release status
Build Status Release Status

How it works

This is a simple example of async integration using Azure WebJobs on an Azure Linux docker-compose WebApp. It has a simple form to fill with some information (just like a kind of inspection). Inserted data is sent to server and you'll always receive an answer. If everything runs fine, you'll receive an email with your PDF report in the Languages you choose. Otherwise, you'll receive an error message.

Azure WebJobs are background services that are perfect for services integration and/or long time tasks (like PDF generation and external API calls).

WebJobs run connected to Azure Storage Queues and one of the best resources (in my opinion) is the ability to use -poison queue. When a run fails after X times (default is five), the message is sent to a -poison queue. So if for any reason your execution falls in an error, you can have a second WebJob Function connected to the -poison queue to handle the situation.

GitHub Integration

The content of this example can be found at https://pdf.ricardogaefke.com.

Azure Pipelines

This application is automatically built, tested and deployed by Azure Pipelines. Each git push to master or to a PR is built and tested by Azure Pipelines. If the build of master branch is ok the Release takes place and updates the app using Docker integration.

This is the public Azure Pipeline.

Docker Registry

The containers of this app are registered in a public repo and can be found at docker/ricardogaefke/ricardogaefke-pdf.

Tech summary:

  • ASP.NET Core - High-performance, open-source , multi-format framework for building modern Internet-connected and cloud-based applications.
  • Azure - A cloud plataform.
  • Azure Pipelines - Implement continuous integration and continuous delivery (CI/CD) for the app and platform of your choice.
  • Azure SQL - Azure SQL Server.
  • Azure Storage - Azure Storage.
  • Azure WebApp - A modern web app service that offers streamlined full-stack development from source code to global high availability.
  • Azure Webjobs - Azure Webjobs.
  • C# - Language C# to .NET Platform.
  • Docker - Platform for developers and sysadmins to build, run, and share.
  • GitHub - The biggest developer community in the World.
  • Material-UI - React components library.
  • React - JavaScript library for building user interfaces.
  • Server Side Rendering - Server Side Rendering (SSR) to add pre-rendered HTML to the page.
  • Linux - Linux documentation.
  • Alpine - Linux Alpine documentation.
  • NGINX - Free, open-source, high-performance HTTP server, reverse proxy, and IMAP/POP3 proxy server.
  • Typescript - Typed superset of JavaScript that compiles to plain JavaScript.

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details.