Giter Site home page Giter Site logo

getlago / lago Goto Github PK

View Code? Open in Web Editor NEW
6.1K 39.0 253.0 134.63 MB

Open Source Metering and Usage Based Billing API ⭐️ Consumption tracking, Subscription management, Pricing iterations, Payment orchestration & Revenue analytics

Home Page: https://www.getlago.com

License: GNU Affero General Public License v3.0

Shell 100.00%
billing fintech invoices payments usage-based-billing subscriptions metering pricing analytics open-source

lago's Introduction

Lago

Lago

Open Source Metering & Usage-Based Billing

The best alternative to Chargebee, Recurly or Stripe Billing.
For usage-based, subscription-based, and all the nuances of pricing in between.

Slack · Website · Issues · Roadmap

Lago - Open-source alternative to Stripe Billing and Chargebee | Product Hunt

Lago - Open-source alternative to Stripe Billing and Chargebee | Product Hunt

Join Lago on Slack Github Stars Hacker News License

The programmable API for usage-based billing

Lago Billing System Presentation

The problem: Billing systems are still a nightmare for engineers

Billing nightmare Engineers be like…

Read more first-hand experiences from Qonto, Algolia, Pleo, Segment, or the 350+. Hackernews comments here.

The Solution: Lago, the open-source billing API for product-led SaaS

  • Event-based: if you can track it, you can charge for it;
  • Built for product-led growth companies;
  • Hybrid pricing: subscription and usage;
  • Hybrid go-to-market motion: self-serve and sales-led.

Open-source, open architecture:

  • Composable: connect Lago to any of your internal systems or tools (i.e. any payment gateway, CRM, CPQ, accounting software);
  • Pricing: we’re not rent seekers, we’re not asking for a % of your revenue. Our self-hosted version is free. Our cloud version is priced like a SaaS;
  • Privacy: your data never has to leave your infrastructure.

✨ Features

  • Usage metering: Lago's event-based architecture provides a solid foundation for building a fair pricing model that scales with your business.
  • Price plans: Lago supports all pricing models. Create pay-as-you-go and hybrid plans in no time with our intuitive user interface or API.
  • Coupons: Create engaging marketing campaigns and increase conversion with coupons that customers can redeem to get a discount.
  • Add-ons: Why wait until the end of the billing cycle to get paid? Lago allows you to create one-time charges that are invoiced on the fly.
  • Invoicing: Depending on the configuration of your plans, Lago automatically calculates what each customer owes you and generates invoices.
  • Prepaid credits: Unlock recurring revenue opportunities for pay-as-you-go pricing models with Lago’s prepaid credit features.

🔔 Stay up to date

Lago launched its v0.1 on June 2nd, 2022. Lots of new features are coming, and are generally released on a bi-weekly basis. Watch updates of this repository to be notified of future updates.

Check out our public roadmap

🔖 License

Distributed under the AGPLv3 License. Read more here.

💻 Deploy locally

Requirements

  1. Install Docker on your machine;
  2. Make sure Docker Compose is installed and available (it should be the case if you have chosen to install Docker via Docker Desktop); and
  3. Make sure Git is installed on your machine.

Run the app

To start using Lago, run the following commands in a shell:

# Get the code
git clone https://github.com/getlago/lago.git

# Go to Lago folder
cd lago

# Set up environment configuration
echo "LAGO_RSA_PRIVATE_KEY=\"`openssl genrsa 2048 | base64`\"" >> .env
source .env

# Start
docker-compose up

You can now open your browser and go to http://localhost to connect to the application. Lago's API is exposed at http://localhost:3000.

Note that if our docker server is not at http://localhost, the following env variables must be set: LAGO_API_URL. This may be on the command line or in your .env file. For example:

LAGO_API_URL="http://192.168.122.71:3000"
LAGO_FRONT_URL="http://192.168.122.71"

Find your API key

Your API Key can be found directly in the UI:

  1. Access the Developer section from the sidebar;
  2. The first tab of this section is related to your API keys; and
  3. Click the Copy button to copy it to clipboard.

Analytics and tracking

Please note that Lago, by default, tracks basic actions performed on your self-hosted instance. If you do not disable tracking, you may receive specific communications or product updates. However, rest assured that Lago will not collect any personal information about your customers or financial information about your invoices.

If you would like to know more about Lago's analytics or remove the entire tracking, please refer to this page for comprehensive information.

Version, environment variables and components

Docker images are always updated to the last stable version in the docker-compose.yml file. You can use a different tag if needed by checking the releases list.

Lago uses the following environment variables to configure the components of the application. You can override them to customise your setup. Take a closer look are our documentation.

☁️ Use our cloud-based product

Contact our team at [email protected] to get started with Lago Cloud. More information on our website.

🚀 Getting the most out of Lago

  • See the documentation to learn more about all the features;
  • Use our templates to get inspiration and learn how to reproduce Algolia’s, Segment’s and Klaviyo’s pricing models;
  • Join our Slack community if you need help, or want to chat, we’re here to help;
  • Contribute on GitHub: read our guidelines;
  • Follow us on Twitter for the latest news;
  • You can email us as well: [email protected].

🧑‍💻 Contributions and development environment

You can follow this guide to set up a Lago development environment on your machine. This guide is intended for people willing to contribute to Lago. If you want to try Lago on your local system, we recommend that you take a look at Lago's public documentation.

You can contribute by following our guidelines.

💡 Philosophy

B2B SaaS has evolved, but billing has not yet.

1- We’re not in the “subscription economy” anymore. And we won’t go “full usage-based pricing” quite yet

Pricings are now mostly hybrid: they include a usage-based component (i.e. “if you use more you pay more”) and a subscription component (i.e. a recurring fee for basic usage).

Not all software companies will go full “usage-based” like Snowflake for instance. This model is the new standard for cloud infrastructure products. However, in other areas of SaaS, users want to know beforehand how much they will pay to control their spending and software companies want to be able to predict recurring revenues.

2- Go-to-market is not either bottom-up or top-down anymore

SaaS used to be either self-service (SMBs) or sales-led (Enterprises). Go-to-market now mixes the self-service (all customers access the same price plans) and sales-led (customers get a custom quote from a sales representative) motions. A typical journey involves an individual contributor in a company who tests a new tool, puts their corporate credit card in, and starts spreading the use of the tool within the organization. At that point, the VP or head of department might want to upgrade to a custom plan tailored to the needs of the whole organization. As a result, billing needs to be flexible, automated, and transparent enough to embrace this hybrid go-to-market motion as well.

3- The “rent seeker” pricing of current billing solutions needs to stop

Why do payment companies take a cut on revenues? Because the higher the amount, the higher the risk for them (e.g. fraud, disputes, etc.).

Why did billing companies adopt the same pricing structure? We’re not able to provide an answer that makes sense. It’s been said on the internet that they did this because they could (read more here).

One last thing…

Lago is agnostic and we aim at being as transparent as possible, so we won’t nudge or lock you into using a specific tool in exchange for using our billing API (learn more).

lago's People

Contributors

aaronjohnson avatar anhtho-lago avatar ansmonjol avatar dorianmariecom avatar enzonaute avatar ibrahimbeladi avatar ivannovosad avatar jdenquin avatar jerbob92 avatar jotolo avatar lovrocolic avatar mathieu-lago avatar michaelponrajah avatar morganelecurieux avatar poly4concept avatar porter-deployment-app[bot] avatar rsempe avatar sarkissianraffi avatar stephentgrammer avatar stuartjmackintosh avatar tjschutte avatar vincent-pochet 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  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

lago's Issues

[BUG]: can't run docker image

Describe the bug
Unable to run docker image via "docker-compose up" as mentioned in docs. See error log in screenshot section.

To Reproduce
docker-compose up

Expected behavior
Should run lago instance

Screenshots

lago-front   | 2022/06/09 09:33:29 [notice] 1#1: using the "epoll" event method
lago-front   | 2022/06/09 09:33:29 [notice] 1#1: nginx/1.21.6
lago-front   | 2022/06/09 09:33:29 [notice] 1#1: built by gcc 10.3.1 20211027 (Alpine 10.3.1_git20211027)
lago-front   | 2022/06/09 09:33:29 [notice] 1#1: OS: Linux 5.10.104-linuxkit
lago-front   | 2022/06/09 09:33:29 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
lago-front   | 2022/06/09 09:33:29 [notice] 1#1: start worker processes
lago-front   | 2022/06/09 09:33:29 [notice] 1#1: start worker process 12
lago-front   | 2022/06/09 09:33:29 [notice] 1#1: start worker process 13
lago-front   | 2022/06/09 09:33:29 [notice] 1#1: start worker process 14
lago-front   | 2022/06/09 09:33:29 [notice] 1#1: start worker process 15
lago-api     | rake aborted!
lago-api     | OpenSSL::PKey::RSAError: Neither PUB key nor PRIV key: header too long
lago-api     | /app/config/initializers/rsa_keys.rb:9:in `initialize'
lago-api     | /app/config/initializers/rsa_keys.rb:9:in `new'
lago-api     | /app/config/initializers/rsa_keys.rb:9:in `<main>'
lago-api     | /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `load'
lago-api     | /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `load'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:667:in `block in load_config_initializer'
lago-api     | /usr/local/bundle/gems/activesupport-7.0.3/lib/active_support/notifications.rb:208:in `instrument'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:666:in `load_config_initializer'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:620:in `block (2 levels) in <class:Engine>'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:619:in `each'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:619:in `block in <class:Engine>'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:32:in `instance_exec'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:32:in `run'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:61:in `block in run_initializers'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:50:in `each'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:50:in `tsort_each_child'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:60:in `run_initializers'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/application.rb:372:in `initialize!'
lago-api     | /app/config/environment.rb:7:in `<main>'
lago-api     | /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
lago-api     | /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
lago-api     | /usr/local/bundle/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/application.rb:348:in `require_environment!'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/application.rb:511:in `block in run_tasks_blocks'
lago-api     | /usr/local/bundle/gems/sentry-ruby-core-5.3.0/lib/sentry/rake.rb:24:in `execute'
lago-api     | /usr/local/bundle/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
lago-api     | /usr/local/bin/bundle:23:in `load'
lago-api     | /usr/local/bin/bundle:23:in `<main>'
lago-api     | Tasks: TOP => db:migrate => db:load_config => environment
lago-api     | (See full trace by running task with --trace)
lago-worker  | 2022-06-09T09:33:32.846Z pid=8 tid=2qo WARN: OpenSSL::PKey::RSAError: Neither PUB key nor PRIV key: header too long
lago-worker  | 2022-06-09T09:33:32.847Z pid=8 tid=2qo WARN: /app/config/initializers/rsa_keys.rb:9:in `initialize'
lago-worker  | /app/config/initializers/rsa_keys.rb:9:in `new'
lago-worker  | /app/config/initializers/rsa_keys.rb:9:in `<main>'
lago-worker  | /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `load'
lago-worker  | /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `load'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:667:in `block in load_config_initializer'
lago-worker  | /usr/local/bundle/gems/activesupport-7.0.3/lib/active_support/notifications.rb:208:in `instrument'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:666:in `load_config_initializer'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:620:in `block (2 levels) in <class:Engine>'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:619:in `each'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:619:in `block in <class:Engine>'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:32:in `instance_exec'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:32:in `run'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:61:in `block in run_initializers'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:228:in `block in tsort_each'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:431:in `each_strongly_connected_component_from'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:50:in `each'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:50:in `tsort_each_child'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:415:in `call'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:415:in `each_strongly_connected_component_from'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:349:in `block in each_strongly_connected_component'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:347:in `each'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:347:in `call'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:347:in `each_strongly_connected_component'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:226:in `tsort_each'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:205:in `tsort_each'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:60:in `run_initializers'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/application.rb:372:in `initialize!'
lago-worker  | /app/config/environment.rb:7:in `<top (required)>'
lago-worker  | /usr/local/bundle/gems/sidekiq-6.4.1/lib/sidekiq/cli.rb:273:in `require'
lago-worker  | /usr/local/bundle/gems/sidekiq-6.4.1/lib/sidekiq/cli.rb:273:in `boot_application'
lago-worker  | /usr/local/bundle/gems/sidekiq-6.4.1/lib/sidekiq/cli.rb:37:in `run'
lago-worker  | /usr/local/bundle/gems/sidekiq-6.4.1/bin/sidekiq:31:in `<top (required)>'
lago-worker  | /usr/local/bundle/bin/sidekiq:23:in `load'
lago-worker  | /usr/local/bundle/bin/sidekiq:23:in `<top (required)>'
lago-worker  | /usr/local/lib/ruby/3.0.0/bundler/cli/exec.rb:63:in `load'
lago-worker  | /usr/local/lib/ruby/3.0.0/bundler/cli/exec.rb:63:in `kernel_load'
lago-worker  | /usr/local/lib/ruby/3.0.0/bundler/cli/exec.rb:28:in `run'
lago-worker  | /usr/local/lib/ruby/3.0.0/bundler/cli.rb:494:in `exec'
lago-worker  | /usr/local/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
lago-worker  | /usr/local/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
lago-worker  | /usr/local/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
lago-worker  | /usr/local/lib/ruby/3.0.0/bundler/cli.rb:30:in `dispatch'
lago-worker  | /usr/local/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
lago-worker  | /usr/local/lib/ruby/3.0.0/bundler/cli.rb:24:in `start'
lago-worker  | /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.15/libexec/bundle:49:in `block in <top (required)>'
lago-worker  | /usr/local/lib/ruby/3.0.0/bundler/friendly_errors.rb:130:in `with_friendly_errors'
lago-worker  | /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.15/libexec/bundle:37:in `<top (required)>'
lago-worker  | /usr/local/bin/bundle:23:in `load'
lago-worker  | /usr/local/bin/bundle:23:in `<main>'
lago-clock   | bundler: failed to load command: clockwork (/usr/local/bundle/bin/clockwork)
lago-clock   | /app/config/initializers/rsa_keys.rb:9:in `initialize': Neither PUB key nor PRIV key: header too long (OpenSSL::PKey::RSAError)
lago-clock   | 	from /app/config/initializers/rsa_keys.rb:9:in `new'
lago-clock   | 	from /app/config/initializers/rsa_keys.rb:9:in `<main>'
lago-clock   | 	from /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `load'
lago-clock   | 	from /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `load'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:667:in `block in load_config_initializer'
lago-clock   | 	from /usr/local/bundle/gems/activesupport-7.0.3/lib/active_support/notifications.rb:208:in `instrument'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:666:in `load_config_initializer'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:620:in `block (2 levels) in <class:Engine>'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:619:in `each'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:619:in `block in <class:Engine>'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:32:in `instance_exec'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:32:in `run'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:61:in `block in run_initializers'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:228:in `block in tsort_each'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:431:in `each_strongly_connected_component_from'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:50:in `each'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:50:in `tsort_each_child'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:415:in `call'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:415:in `each_strongly_connected_component_from'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:349:in `block in each_strongly_connected_component'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:347:in `each'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:347:in `call'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:347:in `each_strongly_connected_component'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:226:in `tsort_each'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:205:in `tsort_each'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:60:in `run_initializers'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/application.rb:372:in `initialize!'
lago-clock   | 	from /app/config/environment.rb:7:in `<main>'
lago-clock   | 	from /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
lago-clock   | 	from /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
lago-clock   | 	from /app/clock.rb:5:in `<top (required)>'
lago-clock   | 	from /usr/local/bundle/gems/clockwork-3.0.0/bin/clockwork:12:in `require'
lago-clock   | 	from /usr/local/bundle/gems/clockwork-3.0.0/bin/clockwork:12:in `<top (required)>'
lago-clock   | 	from /usr/local/bundle/bin/clockwork:23:in `load'
lago-clock   | 	from /usr/local/bundle/bin/clockwork:23:in `<top (required)>'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/bundler/cli/exec.rb:63:in `load'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/bundler/cli/exec.rb:63:in `kernel_load'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/bundler/cli/exec.rb:28:in `run'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/bundler/cli.rb:494:in `exec'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/bundler/cli.rb:30:in `dispatch'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/bundler/cli.rb:24:in `start'
lago-clock   | 	from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.15/libexec/bundle:49:in `block in <top (required)>'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/bundler/friendly_errors.rb:130:in `with_friendly_errors'
lago-clock   | 	from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.15/libexec/bundle:37:in `<top (required)>'
lago-clock   | 	from /usr/local/bin/bundle:23:in `load'
lago-clock   | 	from /usr/local/bin/bundle:23:in `<main>'
lago-worker exited with code 1
lago-clock exited with code 1
lago-api     | => Booting Puma
lago-api     | => Rails 7.0.3 application starting in production
lago-api     | => Run `bin/rails server --help` for more startup options
lago-api     | Exiting
lago-api     | /app/config/initializers/rsa_keys.rb:9:in `initialize': Neither PUB key nor PRIV key: header too long (OpenSSL::PKey::RSAError)
lago-api     | 	from /app/config/initializers/rsa_keys.rb:9:in `new'
lago-api     | 	from /app/config/initializers/rsa_keys.rb:9:in `<main>'
lago-api     | 	from /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `load'
lago-api     | 	from /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `load'
lago-api     | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:667:in `block in load_config_initializer'
lago-api     | 	from /usr/local/bundle/gems/activesupport-7.0.3/lib/active_support/notifications.rb:208:in `instrument'
lago-api     | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:666:in `load_config_initializer'
lago-api     | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:620:in `block (2 levels) in <class:Engine>'
lago-api     | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:619:in `each'
lago-api     | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:619:in `block in <class:Engine>'
lago-api     | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:32:in `instance_exec'
lago-api     | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:32:in `run'
lago-api     | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:61:in `block in run_initializers'
lago-api     | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:228:in `block in tsort_each'
lago-api     | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
lago-api     | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
lago-api     | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:431:in `each_strongly_connected_component_from'
lago-api     | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
lago-api     | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:50:in `each'
lago-api     | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:50:in `tsort_each_child'
lago-api     | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:415:in `call'
lago-api     | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:415:in `each_strongly_connected_component_from'
lago-api     | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:349:in `block in each_strongly_connected_component'
lago-api     | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:347:in `each'
lago-api     | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:347:in `call'
lago-api     | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:347:in `each_strongly_connected_component'
lago-api     | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:226:in `tsort_each'
lago-api     | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:205:in `tsort_each'
lago-api     | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:60:in `run_initializers'
lago-api     | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/application.rb:372:in `initialize!'
lago-api     | 	from /app/config/environment.rb:7:in `<main>'
lago-api     | 	from /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
lago-api     | 	from /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
lago-api     | 	from /usr/local/bundle/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
lago-api     | 	from /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:42:in `require_relative'
lago-api     | 	from config.ru:3:in `block in <main>'
lago-api     | 	from /usr/local/bundle/gems/rack-2.2.3.1/lib/rack/builder.rb:116:in `eval'
lago-api     | 	from /usr/local/bundle/gems/rack-2.2.3.1/lib/rack/builder.rb:116:in `new_from_string'
lago-api     | 	from /usr/local/bundle/gems/rack-2.2.3.1/lib/rack/builder.rb:105:in `load_file'
lago-api     | 	from /usr/local/bundle/gems/rack-2.2.3.1/lib/rack/builder.rb:66:in `parse_file'
lago-api     | 	from /usr/local/bundle/gems/rack-2.2.3.1/lib/rack/server.rb:349:in `build_app_and_options_from_config'
lago-api     | 	from /usr/local/bundle/gems/rack-2.2.3.1/lib/rack/server.rb:249:in `app'
lago-api     | 	from /usr/local/bundle/gems/rack-2.2.3.1/lib/rack/server.rb:422:in `wrapped_app'
lago-api     | 	from /usr/local/bundle/gems/rack-2.2.3.1/lib/rack/server.rb:312:in `block in start'
lago-api     | 	from /usr/local/bundle/gems/rack-2.2.3.1/lib/rack/server.rb:379:in `handle_profiling'
lago-api     | 	from /usr/local/bundle/gems/rack-2.2.3.1/lib/rack/server.rb:311:in `start'
lago-api     | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/commands/server/server_command.rb:38:in `start'
lago-api     | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/commands/server/server_command.rb:143:in `block in perform'
lago-api     | 	from <internal:kernel>:90:in `tap'
lago-api     | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/commands/server/server_command.rb:134:in `perform'
lago-api     | 	from /usr/local/bundle/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
lago-api     | 	from /usr/local/bundle/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
lago-api     | 	from /usr/local/bundle/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
lago-api     | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/command/base.rb:87:in `perform'
lago-api     | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/command.rb:48:in `invoke'
lago-api     | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/commands.rb:18:in `<main>'
lago-api     | 	from /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
lago-api     | 	from /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
lago-api     | 	from bin/rails:4:in `<main>'
lago-api exited with code 1
lago-clock   | bundler: failed to load command: clockwork (/usr/local/bundle/bin/clockwork)
lago-clock   | /app/config/initializers/rsa_keys.rb:9:in `initialize': Neither PUB key nor PRIV key: header too long (OpenSSL::PKey::RSAError)
lago-clock   | 	from /app/config/initializers/rsa_keys.rb:9:in `new'
lago-clock   | 	from /app/config/initializers/rsa_keys.rb:9:in `<main>'
lago-clock   | 	from /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `load'
lago-clock   | 	from /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `load'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:667:in `block in load_config_initializer'
lago-clock   | 	from /usr/local/bundle/gems/activesupport-7.0.3/lib/active_support/notifications.rb:208:in `instrument'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:666:in `load_config_initializer'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:620:in `block (2 levels) in <class:Engine>'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:619:in `each'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:619:in `block in <class:Engine>'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:32:in `instance_exec'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:32:in `run'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:61:in `block in run_initializers'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:228:in `block in tsort_each'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:431:in `each_strongly_connected_component_from'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:50:in `each'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:50:in `tsort_each_child'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:415:in `call'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:415:in `each_strongly_connected_component_from'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:349:in `block in each_strongly_connected_component'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:347:in `each'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:347:in `call'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:347:in `each_strongly_connected_component'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:226:in `tsort_each'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:205:in `tsort_each'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:60:in `run_initializers'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/application.rb:372:in `initialize!'
lago-clock   | 	from /app/config/environment.rb:7:in `<main>'
lago-clock   | 	from /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
lago-clock   | 	from /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
lago-clock   | 	from /app/clock.rb:5:in `<top (required)>'
lago-clock   | 	from /usr/local/bundle/gems/clockwork-3.0.0/bin/clockwork:12:in `require'
lago-clock   | 	from /usr/local/bundle/gems/clockwork-3.0.0/bin/clockwork:12:in `<top (required)>'
lago-clock   | 	from /usr/local/bundle/bin/clockwork:23:in `load'
lago-clock   | 	from /usr/local/bundle/bin/clockwork:23:in `<top (required)>'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/bundler/cli/exec.rb:63:in `load'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/bundler/cli/exec.rb:63:in `kernel_load'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/bundler/cli/exec.rb:28:in `run'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/bundler/cli.rb:494:in `exec'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/bundler/cli.rb:30:in `dispatch'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/bundler/cli.rb:24:in `start'
lago-clock   | 	from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.15/libexec/bundle:49:in `block in <top (required)>'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/bundler/friendly_errors.rb:130:in `with_friendly_errors'
lago-clock   | 	from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.15/libexec/bundle:37:in `<top (required)>'
lago-clock   | 	from /usr/local/bin/bundle:23:in `load'
lago-clock   | 	from /usr/local/bin/bundle:23:in `<main>'
lago-worker  | 2022-06-09T09:33:35.239Z pid=9 tid=2qp WARN: OpenSSL::PKey::RSAError: Neither PUB key nor PRIV key: header too long
lago-worker  | 2022-06-09T09:33:35.239Z pid=9 tid=2qp WARN: /app/config/initializers/rsa_keys.rb:9:in `initialize'
lago-worker  | /app/config/initializers/rsa_keys.rb:9:in `new'
lago-worker  | /app/config/initializers/rsa_keys.rb:9:in `<main>'
lago-worker  | /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `load'
lago-worker  | /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `load'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:667:in `block in load_config_initializer'
lago-worker  | /usr/local/bundle/gems/activesupport-7.0.3/lib/active_support/notifications.rb:208:in `instrument'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:666:in `load_config_initializer'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:620:in `block (2 levels) in <class:Engine>'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:619:in `each'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:619:in `block in <class:Engine>'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:32:in `instance_exec'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:32:in `run'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:61:in `block in run_initializers'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:228:in `block in tsort_each'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:431:in `each_strongly_connected_component_from'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:50:in `each'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:50:in `tsort_each_child'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:415:in `call'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:415:in `each_strongly_connected_component_from'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:349:in `block in each_strongly_connected_component'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:347:in `each'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:347:in `call'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:347:in `each_strongly_connected_component'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:226:in `tsort_each'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:205:in `tsort_each'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:60:in `run_initializers'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/application.rb:372:in `initialize!'
lago-worker  | /app/config/environment.rb:7:in `<top (required)>'
lago-worker  | /usr/local/bundle/gems/sidekiq-6.4.1/lib/sidekiq/cli.rb:273:in `require'
lago-worker  | /usr/local/bundle/gems/sidekiq-6.4.1/lib/sidekiq/cli.rb:273:in `boot_application'
lago-worker  | /usr/local/bundle/gems/sidekiq-6.4.1/lib/sidekiq/cli.rb:37:in `run'
lago-worker  | /usr/local/bundle/gems/sidekiq-6.4.1/bin/sidekiq:31:in `<top (required)>'
lago-worker  | /usr/local/bundle/bin/sidekiq:23:in `load'
lago-worker  | /usr/local/bundle/bin/sidekiq:23:in `<top (required)>'
lago-worker  | /usr/local/lib/ruby/3.0.0/bundler/cli/exec.rb:63:in `load'
lago-worker  | /usr/local/lib/ruby/3.0.0/bundler/cli/exec.rb:63:in `kernel_load'
lago-worker  | /usr/local/lib/ruby/3.0.0/bundler/cli/exec.rb:28:in `run'
lago-worker  | /usr/local/lib/ruby/3.0.0/bundler/cli.rb:494:in `exec'
lago-worker  | /usr/local/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
lago-worker  | /usr/local/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
lago-worker  | /usr/local/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
lago-worker  | /usr/local/lib/ruby/3.0.0/bundler/cli.rb:30:in `dispatch'
lago-worker  | /usr/local/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
lago-worker  | /usr/local/lib/ruby/3.0.0/bundler/cli.rb:24:in `start'
lago-worker  | /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.15/libexec/bundle:49:in `block in <top (required)>'
lago-worker  | /usr/local/lib/ruby/3.0.0/bundler/friendly_errors.rb:130:in `with_friendly_errors'
lago-worker  | /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.15/libexec/bundle:37:in `<top (required)>'
lago-worker  | /usr/local/bin/bundle:23:in `load'
lago-worker  | /usr/local/bin/bundle:23:in `<main>'
lago-clock exited with code 1
lago-worker exited with code 1
lago-api     | rake aborted!
lago-api     | OpenSSL::PKey::RSAError: Neither PUB key nor PRIV key: header too long
lago-api     | /app/config/initializers/rsa_keys.rb:9:in `initialize'
lago-api     | /app/config/initializers/rsa_keys.rb:9:in `new'
lago-api     | /app/config/initializers/rsa_keys.rb:9:in `<main>'
lago-api     | /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `load'
lago-api     | /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `load'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:667:in `block in load_config_initializer'
lago-api     | /usr/local/bundle/gems/activesupport-7.0.3/lib/active_support/notifications.rb:208:in `instrument'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:666:in `load_config_initializer'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:620:in `block (2 levels) in <class:Engine>'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:619:in `each'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:619:in `block in <class:Engine>'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:32:in `instance_exec'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:32:in `run'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:61:in `block in run_initializers'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:50:in `each'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:50:in `tsort_each_child'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:60:in `run_initializers'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/application.rb:372:in `initialize!'
lago-api     | /app/config/environment.rb:7:in `<main>'
lago-api     | /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
lago-api     | /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
lago-api     | /usr/local/bundle/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/application.rb:348:in `require_environment!'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/application.rb:511:in `block in run_tasks_blocks'
lago-api     | /usr/local/bundle/gems/sentry-ruby-core-5.3.0/lib/sentry/rake.rb:24:in `execute'
lago-api     | /usr/local/bundle/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
lago-api     | /usr/local/bin/bundle:23:in `load'
lago-api     | /usr/local/bin/bundle:23:in `<main>'
lago-api     | Tasks: TOP => db:migrate => db:load_config => environment
lago-api     | (See full trace by running task with --trace)
^CGracefully stopping... (press Ctrl+C again to force)
[+] Running 6/6
 ⠿ Container lago-worker  Stopped                                                                                                                                                                  0.8s
 ⠿ Container lago-clock   Stopped                                                                                                                                                                  0.4s
 ⠿ Container lago-front   Stopped                                                                                                                                                                  0.3s
 ⠿ Container lago-api     Stopped                                                                                                                                                                  0.3s
 ⠿ Container lago-db      Stopped                                                                                                                                                                  0.2s
 ⠿ Container lago-redis   Stopped                                                                                                                                                                  0.3s
canceled```

</details>

**Support**
 - OS: osx 12.4


[FEAT]: OAuth2 authorization

Is your feature request related to a problem? Please describe.
Many of the organizations already have a IdP available. Lago could leverage e.g. OAUTH2 (as it's currently one of the most popular protocols) to give ability to authorize API requests and give ability to login via the frontend which could potentially be beneficial in case of other features like giving access to usage/invoicing data that is currently being developed.

Describe the solution you'd like
use one of the sso libraries avialable and give ability to configure required paramters. Give ability to restrict who can use the system based at least on some group or give ability to configure the permission field from the JWT.

Define a currency on the customer object

Problem description

Improve the Coupon's experience:

  1. Coupons applied to customers having a pay in advance are impacted on the next current period.
  2. Display the remaining amount left on the Coupon once customer start to use it
  3. When creating the coupon, allow user to set if the coupon can be applied multiple time or one time on a unique customer

Having the currency on the customer allow us to apply any object on it before starting a subscription

How important is this for you?

Event filtering on aggregation types for usage-based billing

Problem description

When receiving events, a user is not able to filter it with an existing property.
For example, you receive a billable event anytime there is a new transaction, but you want to filter by transaction having a completed status. You don't want to implement the logic on your backend and that's totally fine

We should be able to filter events coming in Lago and bill only filtered events

How important is this for you?

Custom SQL for billing aggregation types

Problem description

Lago supports 4 main aggregation types to aggregate events into billable metrics:

  • COUNT
  • SUM
  • MAX
  • COUNT DISTINCT

This should cover the majority of cases. But for long tail use cases, you might need to add another aggregation type. This can be done by letting you write custom SQL for incoming events

How important is this for you?

[FEAT]: Enable to use the same billable metric for several charges

Is your feature request related to a problem? Please describe.
Example from M.T (one of our users): Imagine you want to charge your customer monthly for active users (standard unit pricing). You also want to charge your customer for support, based on number of active users as well, but capped (for example graduated pricing, flat fee, last tier = 0 EUR).”

Describe the solution you'd like
Use the same billable metric to create several charges

[FEAT]: Ability to disable signup

For those of us who are self-hosting, allowing signup after the initial organization(s) are created doesn't make sense.

One solution would be to set an environment variable, e.g. LAGO_SIGNUP_DISABLED which would remove the ability to signup on both the front-end and graphql. Or maybe there's already some feature flagging system that could be used instead.

We are willing to do the work if a PR would be accepted.

[FEAT]: Support billing in customer timezones

From what I can tell Lago currently selects events to be used to calculate fees, etc. by selecting all fees in a given month/year/(etc) time range. However, the time zone used for that select seems to be the system timezone, which will default to UTC in Rails unless configured otherwise.

We have customers in different timezones, and we currently bill customers for usage in their timezone. So a UK customer and a DK customer will include fees for events in two different time ranges, even though they are both for say "usage in June".

Is this something Lago would like to support? If so we would be happy to contribute a PR.

Go Client library

Problem description

Users using Go as a backend language can use Lago with the basic methods. However, they don't have a specific API Client to ease the implementation (as we do for Ruby, Node or Python)

[FEAT]: Ability to replace Sidekiq to Shoryuken Worker

Is your feature request related to a problem? Please describe.
Because Sidekiq is a Redis based worker and in AWS environments running a Redis service can be quite expensive I would propose to give ability to choose a different worker in an configurable-Interface-way so the backward compatibility is preserved. This would give possibility to use Shoryuken as a drop in replacement.

Shoryuken uses SQS as a queue which is cheaper/more scalable for larger installations. For local dev/on-prem installations one can use e.g. Elasticmq as a broker (avaiable as both standalone and docker image installation with in-memory/persistent storage)

Create and apply coupons to customers

Problem description

There's no way to apply a monetary discount on an invoice easily with no headaches to one or several customers.

There’s no system in Lago that allow our user to handle this right now.

How important is this for you?

Log charges events in the app

Problem description

  1. We cannot fetch programmatically the usage of a customer and reuse this info
  2. We cannot give details of the actual usage linked to the amount charged in a past invoice
  3. We cannot give details of the usage of the current billing period (next invoice)
  4. We don’t have a system to track all the usage coming into Lago

There’s no system in Lago that display ingested events.

How important is this for you?

Create a fee that will be charge once on customers

Problem description

It’s impossible for our users to add a one-time charge to a customer.

Today, a charge is always recurring or linked to a Billable metric which can occur several times and Lago don’t handle one-time charge systems for now.

How important is this for you?

Generate invoices in PDF

Problem description

Users can’t send invoices to their customer right now. They have to build a PDF system to send invoices or send it to another provider to use the JSON provided from Lago

How important is this for you?

[FEAT]: Reverse a charge

Our Scenario: Customers get charged a commission (billable unit) but very ocassionally we want to revert that charge when the transaction is cancelled.

We thus need to be able to either send the same event again but have Lago know to revert the charge or an API endpoint perhaps?

The complexity also is that these customers are on a Graduated charge model. Thus if there are charges after that one to revert that were charged into the next tier, in a perfect world they would be recalculated but that seems highly problematic to implement.

Error webhook on event ingestion

Problem description

When triggering an event without customer_id or code, no error is showing up. It could be great to send an async error reponse via webhook to inform our users

[FEAT]: Allow creating an invoice out of cycle

Is your feature request related to a problem? Please describe.
Sometimes it would be nice to force creating an invoice before the billing cycle end, for example to immediately create an invoice for a one-off add-on that has been added.

[FEAT]: add Event show API endpoint

We want to be 100% sure that our events have been created as our revenue depends on it. The current system optimizes for throughput by enqueuing a Sidekick job in Redis to create the event. Depending on the Redis configuration, there is a possibility of losing data if Redis crashes before the job can be worked. And unfortunately many cloud providers limit what configuration options are available.

We would love to have a confirmation that the event is safely stored in Postgres. One way to achieve this would be to send our webhook endpoint an event.created webhook with the event that has been created. Then we can update our system to mark the outgoing billing event as "created_in_billing_system" or whatever.

We are willing to submit a PR if this is something Lago wants to support.

Bill Charges monthly on a yearly plan

Problem description

When a user creates a plan based on a yearly frequency, she can't track the charges monthly and has to follow plan's frequency.
User can't charge the customer monthly usage even if the plan is billed yearly.

How important is this for you?

[FEAT]: Allow doing an invoice dry-run

Is your feature request related to a problem? Please describe.
It would be nice to be able to create a dry-run invoice to test what kind of invoice would be created when an invoice would be created at date x

Add Gauge model as an billable metric aggregate type

Problem description

Users with a pricing model requiring to calculate usage based on time (e.g. gigabyte per hours) can't use Lago as it's not handling this aggregation type for now.

How important is this for you?

[FEAT]: Allow multiple plans per customer

Is your feature request related to a problem? Please describe.
It would be nice to be able to assign multiple plans to the same customer, to have a separate plan per product.

[BUG]: docker images don't have a latest tag

Describe the bug
Docker images are currently published with a v0.1.0-alpha and not latest which means when running docker-compose up command fails because it can't pull the containers from Docker Hub
To Reproduce
follow steps from https://doc.getlago.com/docs/guide/self-hosting/docker#run-the-app to run selfhosted application

suff:lago/ (main) $ docker-compose up                                                                                                                                                                                                                           [21:20:14]
WARN[0000] The "SENTRY_DSN" variable is not set. Defaulting to a blank string.
WARN[0000] The "SENTRY_DSN" variable is not set. Defaulting to a blank string.
WARN[0000] The "SENTRY_DSN" variable is not set. Defaulting to a blank string.
[+] Running 0/4
 ⠿ front Error                        2.1s
 ⠿ api-clock Error                2.1s
 ⠿ api Error                           2.1s
 ⠿ api-worker Error.             2.1s

Expected behavior
Docker stack should start

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.