Skip to content

Commit

Permalink
misc(docker): Add GCL env vars (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdenquin authored Nov 3, 2022
1 parent ca2bd13 commit 942435b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api
Submodule api updated 96 files
+63 −0 app/controllers/api/v1/credit_notes_controller.rb
+37 −0 app/graphql/mutations/credit_notes/create.rb
+26 −0 app/graphql/mutations/credit_notes/update.rb
+24 −0 app/graphql/mutations/credit_notes/void.rb
+13 −0 app/graphql/types/credit_note_items/input.rb
+5 −0 app/graphql/types/credit_note_items/object.rb
+1 −1 app/graphql/types/credit_notes/credit_status_type_enum.rb
+14 −1 app/graphql/types/credit_notes/object.rb
+13 −0 app/graphql/types/credit_notes/refund_status_type_enum.rb
+4 −0 app/graphql/types/mutation_type.rb
+1 −1 app/graphql/types/wallets/object.rb
+2 −0 app/jobs/send_webhook_job.rb
+17 −2 app/models/credit_note.rb
+6 −1 app/models/credit_note_item.rb
+10 −0 app/models/fee.rb
+2 −0 app/models/payment.rb
+1 −0 app/models/payment_provider_customers/base_customer.rb
+1 −0 app/models/payment_providers/base_provider.rb
+8 −0 app/models/refund.rb
+1 −0 app/models/user.rb
+2 −0 app/serializers/v1/credit_note_item_serializer.rb
+4 −0 app/serializers/v1/credit_note_serializer.rb
+20 −0 app/serializers/v1/credit_notes/payment_provider_refund_error_serializer.rb
+1 −1 app/serializers/v1/customer_serializer.rb
+18 −3 app/services/billable_metrics/aggregations/base_service.rb
+2 −0 app/services/billable_metrics/aggregations/count_service.rb
+1 −11 app/services/billable_metrics/aggregations/max_service.rb
+9 −5 app/services/billable_metrics/aggregations/recurring_count_service.rb
+0 −11 app/services/billable_metrics/aggregations/sum_service.rb
+1 −11 app/services/billable_metrics/aggregations/unique_count_service.rb
+4 −3 app/services/charges/charge_models/base_service.rb
+1 −1 app/services/charges/charge_models/graduated_service.rb
+3 −3 app/services/charges/charge_models/package_service.rb
+6 −6 app/services/charges/charge_models/percentage_service.rb
+1 −1 app/services/charges/charge_models/standard_service.rb
+1 −1 app/services/charges/charge_models/volume_service.rb
+15 −5 app/services/credit_notes/create_service.rb
+29 −0 app/services/credit_notes/update_service.rb
+73 −5 app/services/credit_notes/validate_item_service.rb
+26 −0 app/services/credit_notes/void_service.rb
+40 −23 app/services/fees/charge_service.rb
+3 −3 app/services/invoices/create_service.rb
+8 −8 app/services/invoices/customer_usage_service.rb
+30 −7 app/services/persisted_events/create_or_update_service.rb
+1 −3 app/services/plans/update_service.rb
+1 −1 app/services/subscriptions/terminate_service.rb
+32 −0 app/services/webhooks/credit_notes/payment_provider_refund_failure_service.rb
+1 −1 config/routes.rb
+7 −0 db/migrate/20221021135428_add_properties_to_persisted_events.rb
+8 −0 db/migrate/20221021135946_fill_properties_on_persisted_events.rb
+17 −0 db/migrate/20221028124549_create_refunds.rb
+8 −0 db/migrate/20221028160705_fix_currency_on_invoices.rb
+7 −0 db/migrate/20221031141549_add_voided_at_to_credit_notes.rb
+7 −0 db/migrate/20221031144907_add_description_to_credit_notes.rb
+25 −3 db/schema.rb
+1 −1 lib/lago_http_client/lago_http_client/client.rb
+15 −0 lib/tasks/events.rake
+12 −0 lib/tasks/invoices.rake
+97 −6 schema.graphql
+496 −24 schema.json
+121 −1 spec/controllers/api/v1/credit_notes_controller_spec.rb
+2 −0 spec/factories/credit_note_items.rb
+5 −0 spec/factories/subscriptions.rb
+186 −0 spec/graphql/mutations/credit_notes/create_spec.rb
+74 −0 spec/graphql/mutations/credit_notes/update_spec.rb
+72 −0 spec/graphql/mutations/credit_notes/void_spec.rb
+28 −0 spec/graphql/mutations/wallets/create_spec.rb
+4 −0 spec/graphql/resolvers/customer_resolver_spec.rb
+32 −0 spec/jobs/send_webhook_job_spec.rb
+23 −0 spec/lib/lago_http_client/client_spec.rb
+11 −1 spec/models/credit_note_item_spec.rb
+23 −0 spec/models/credit_note_spec.rb
+14 −0 spec/models/fee_spec.rb
+1 −1 spec/requests/api/v1/invoices_spec.rb
+31 −0 spec/serializers/v1/credit_notes/payment_provider_refund_error_serializer_spec.rb
+56 −1 spec/services/billable_metrics/aggregations/count_service_spec.rb
+57 −1 spec/services/billable_metrics/aggregations/max_service_spec.rb
+59 −1 spec/services/billable_metrics/aggregations/recurring_count_service_spec.rb
+58 −1 spec/services/billable_metrics/aggregations/sum_service_spec.rb
+57 −1 spec/services/billable_metrics/aggregations/unique_count_service_spec.rb
+5 −1 spec/services/charges/charge_models/graduated_service_spec.rb
+5 −1 spec/services/charges/charge_models/package_service_spec.rb
+5 −1 spec/services/charges/charge_models/percentage_service_spec.rb
+5 −1 spec/services/charges/charge_models/standard_service_spec.rb
+5 −1 spec/services/charges/charge_models/volume_service_spec.rb
+28 −12 spec/services/credit_notes/create_service_spec.rb
+39 −0 spec/services/credit_notes/update_service_spec.rb
+113 −3 spec/services/credit_notes/validate_item_service_spec.rb
+52 −0 spec/services/credit_notes/void_service_spec.rb
+838 −97 spec/services/fees/charge_service_spec.rb
+1 −0 spec/services/invoices/create_service_spec.rb
+54 −0 spec/services/persisted_events/create_or_update_service_spec.rb
+16 −3 spec/services/plans/update_service_spec.rb
+13 −0 spec/services/subscriptions/terminate_service_spec.rb
+44 −0 spec/services/webhooks/credit_notes/payment_provider_refund_failure_service_spec.rb
+7 −0 spec/support/graphql_helper.rb
6 changes: 6 additions & 0 deletions docker-compose.arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ services:
- LAGO_PDF_URL=${LAGO_PDF_URL:-http://pdf:3000}
- LAGO_REDIS_CACHE_URL=redis://${LAGO_REDIS_CACHE_HOST:-redis}:${LAGO_REDIS_CACHE_PORT:-6379}
- LAGO_DISABLE_SEGMENT=${LAGO_DISABLE_SEGMENT}
- GOCARDLESS_CLIENT_ID=${GOCARDLESS_CLIENT_ID}
- GOCARDLESS_CLIENT_SECRET=${GOCARDLESS_CLIENT_SECRET}
- LAGO_OAUTH_PROXY_URL=${LAGO_OAUTH_PROXY_URL}
ports:
- ${API_PORT:-3000}:3000

Expand All @@ -78,6 +81,7 @@ services:
- APP_ENV=${APP_ENV:-production}
- CODEGEN_API=${LAGO_API_URL:-http://localhost:3000}
- LAGO_DISABLE_SIGNUP=${LAGO_DISABLE_SIGNUP}
- LAGO_OAUTH_PROXY_URL=${LAGO_OAUTH_PROXY_URL}
ports:
- ${FRONT_PORT:-80}:80
- 443:443
Expand Down Expand Up @@ -132,6 +136,8 @@ services:
- LAGO_PDF_URL=${LAGO_PDF_URL:-http://pdf:3000}
- LAGO_REDIS_CACHE_URL=redis://${LAGO_REDIS_CACHE_HOST:-redis}:${LAGO_REDIS_CACHE_PORT:-6379}
- LAGO_DISABLE_SEGMENT=${LAGO_DISABLE_SEGMENT}
- GOCARDLESS_CLIENT_ID=${GOCARDLESS_CLIENT_ID}
- GOCARDLESS_CLIENT_SECRET=${GOCARDLESS_CLIENT_SECRET}

api-clock:
container_name: lago-clock
Expand Down
6 changes: 6 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ services:
- LAGO_PDF_URL=${LAGO_PDF_URL:-http://pdf:3000}
- LAGO_REDIS_CACHE_URL=redis://${LAGO_REDIS_CACHE_HOST:-redis}:${LAGO_REDIS_CACHE_PORT:-6379}
- LAGO_DISABLE_SEGMENT=${LAGO_DISABLE_SEGMENT}
- GOCARDLESS_CLIENT_ID=${GOCARDLESS_CLIENT_ID}
- GOCARDLESS_CLIENT_SECRET=${GOCARDLESS_CLIENT_SECRET}
- LAGO_OAUTH_PROXY_URL=${LAGO_OAUTH_PROXY_URL}
volumes:
- lago_storage_data:/app/storage
# If using GCS, you need to put the credentials keyfile here
Expand All @@ -84,6 +87,7 @@ services:
- APP_ENV=${APP_ENV:-production}
- CODEGEN_API=${LAGO_API_URL:-http://localhost:3000}
- LAGO_DISABLE_SIGNUP=${LAGO_DISABLE_SIGNUP:-false}
- LAGO_OAUTH_PROXY_URL=${LAGO_OAUTH_PROXY_URL}
ports:
- ${FRONT_PORT:-80}:80
# - 443:443
Expand Down Expand Up @@ -139,6 +143,8 @@ services:
- LAGO_PDF_URL=${LAGO_PDF_URL:-http://pdf:3000}
- LAGO_REDIS_CACHE_URL=redis://${LAGO_REDIS_CACHE_HOST:-redis}:${LAGO_REDIS_CACHE_PORT:-6379}
- LAGO_DISABLE_SEGMENT=${LAGO_DISABLE_SEGMENT}
- GOCARDLESS_CLIENT_ID=${GOCARDLESS_CLIENT_ID}
- GOCARDLESS_CLIENT_SECRET=${GOCARDLESS_CLIENT_SECRET}
volumes:
- lago_storage_data:/app/storage

Expand Down

0 comments on commit 942435b

Please sign in to comment.