Skip to content

Make Decidim fully configurable via ENV vars part II#8990

Merged
ahukkanen merged 52 commits intodevelopfrom
feat/env-vars-for-services
Apr 4, 2022
Merged

Make Decidim fully configurable via ENV vars part II#8990
ahukkanen merged 52 commits intodevelopfrom
feat/env-vars-for-services

Conversation

@microstudi
Copy link
Copy Markdown
Contributor

@microstudi microstudi commented Mar 10, 2022

🎩 What? Why?

This PR continues the work started by #8725

Adding the following configurations:

  • Improve and document the decidim executable
  • Add a --storage option in the decidim generator to add gems related to cloud providers
  • Configure cloud storage via ENV vars. Providers supported: s3 (company agnostic), azure, GCS
  • Allow Decidim to serve ActiveStorage uploads via CDN if configured via CDN_HOST variable
  • Initialization vars from decidim-api
  • Initialization vars from decidim-proposals
  • Initialization vars from decidim-meetings
  • Initialization vars from decidim-initiatives
  • Initialization vars from decidim-elections (census, votings, elections)
  • Initialization vars from decidim-consultations
  • Initialization vars from decidim-budgets
  • Initialization vars from decidim-api
  • Initialization vars from decidim-accountability
  • Queue adapter --queue configurable via decidim generator option & ENV vars. Initial support for "sidekiq" only
  • Sidekiq cron (or scheduler) configurable via decidim generator option & ENV vars

New ENV vars:

STORAGE_PROVIDER
STORAGE_CDN_HOST
S3_ACCESS_KEY_ID
S3_SECRET_ACCESS_ID
S3_REGION
S3_BUCKET
S3_ENDPOINT
AZURE_STORAGE_ACCESS_KEY
AZURE_STORAGE_ACCOUNT_NAME
AZURE_CONTAINER
GCS_PROJECT
GCS_BUCKET
GCS_TYPE
GCS_PROJECT_ID
GCS_PRIVATE_KEY_ID
GCS_PRIVATE_KEY
GCS_CLIENT_EMAIL
GCS_CLIENT_ID
GCS_AUTH_URI
GCS_TOKEN_URI
GCS_AUTH_PROVIDER_X509_CERT_URL
GCS_CLIENT_X509_CERT_URL
API_SCHEMA_MAX_PER_PAGE
API_SCHEMA_MAX_COMPLEXITY
API_SCHEMA_MAX_DEPTH
PROPOSALS_SIMILARITY_THRESHOLD
PROPOSALS_SIMILARITY_LIMIT
PROPOSALS_PARTICIPATORY_SPACE_HIGHLIGHTED_PROPOSALS_LIMIT
PROPOSALS_PROCESS_GROUP_HIGHLIGHTED_PROPOSALS_LIMIT
MEETINGS_UPCOMING_MEETING_NOTIFICATION
MEETINGS_ENABLE_PROPOSAL_LINKING
BUDGETS_ENABLE_PROPOSAL_LINKING
ACCOUNTABILITY_ENABLE_PROPOSAL_LINKING
INITIATIVES_CREATION_ENABLED
INITIATIVES_SIMILARITY_THRESHOLD
INITIATIVES_SIMILARITY_LIMIT
INITIATIVES_MINIMUM_COMMITTEE_MEMBERS
INITIATIVES_DEFAULT_SIGNATURE_TIME_PERIOD_LENGTH
INITIATIVES_DEFAULT_COMPONENTS
INITIATIVES_FIRST_NOTIFICATION_PERCENTAGE
INITIATIVES_SECOND_NOTIFICATION_PERCENTAGE
INITIATIVES_STATS_CACHE_EXPIRATION_TIME
INITIATIVES_MAX_TIME_IN_VALIDATING_STATE
INITIATIVES_PRINT_ENABLED
INITIATIVES_DO_NOT_REQUIRE_AUTHORIZATION
ELECTIONS_SETUP_MINIMUM_HOURS_BEFORE_START
ELECTIONS_START_VOTE_MAXIMUM_HOURS_BEFORE_START
ELECTIONS_VOTER_TOKEN_EXPIRATION_MINUTES
VOTINGS_CHECK_CENSUS_MAX_REQUESTS
VOTINGS_THROTTLING_PERIOD
VOTINGS_CENSUS_ACCESS_CODES_EXPORT_EXPIRY_TIME
QUEUE_ADAPTER
SIDEKIQ_CONCURRENCY

📌 Related Issues

Link your PR to an issue

Testing

Describe the best way to test or validate your PR.

📋 Checklist

🚨 Please review the guidelines for contributing to this repository.

  • CONSIDER adding a unit test if your PR resolves an issue.
  • ✔️ DO check open PR's to avoid duplicates.
  • ✔️ DO keep pull requests small so they can be easily reviewed.
  • ✔️ DO build locally before pushing.
  • ✔️ DO make sure tests pass.
  • ✔️ DO make sure any new changes are documented in docs/.
  • ✔️ DO add and modify seeds if necessary.
  • ✔️ DO add CHANGELOG upgrade notes if required.
  • ✔️ DO add to GraphQL API if there are new public fields.
  • ✔️ DO add link to MetaDecidim if it's a new feature.
  • AVOID breaking the continuous integration build.
  • AVOID making significant changes to the overall architecture.

♥️ Thank you!

Copy link
Copy Markdown
Contributor

@ahukkanen ahukkanen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems good and great improvement for the configuration and documentation.

I have one question and few suggestions above if you could address please?

@microstudi
Copy link
Copy Markdown
Contributor Author

@ahukkanen this should be ready.
When approved i need to remove the refences to this branch (tests will break until merged then). Noted in the coments

ahukkanen
ahukkanen previously approved these changes Apr 1, 2022
Copy link
Copy Markdown
Contributor

@ahukkanen ahukkanen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me it's 👍

I jumped in-between with these configuration PRs, so I am sure you have some good reasoning behind these. Technically the code and added documentation looks good to me, even if I'm not the target audience for these changes.

@andreslucena andreslucena added module: generators type: change PRs that implement a change for an existing feature labels Apr 4, 2022
@andreslucena andreslucena changed the title Decidim Env vars configuration part II Make Decidim fully configurable via ENV vars part II Apr 4, 2022
Copy link
Copy Markdown
Member

@andreslucena andreslucena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two really small changes.

Co-authored-by: Andrés Pereira de Lucena <andreslucena@users.noreply.github.com>
Co-authored-by: Andrés Pereira de Lucena <andreslucena@users.noreply.github.com>
@microstudi
Copy link
Copy Markdown
Contributor Author

@ahukkanen @andreslucena changes applied. Should I change back the git references to develop?

@ahukkanen
Copy link
Copy Markdown
Contributor

Should I change back the git references to develop?

Yes please @microstudi

@microstudi microstudi requested a review from andreslucena April 4, 2022 09:49
@microstudi
Copy link
Copy Markdown
Contributor Author

Done!

Copy link
Copy Markdown
Contributor

@ahukkanen ahukkanen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@ahukkanen ahukkanen merged commit 74a545a into develop Apr 4, 2022
@ahukkanen ahukkanen deleted the feat/env-vars-for-services branch April 4, 2022 12:39
entantoencuanto added a commit to PopulateTools/decidim that referenced this pull request Apr 5, 2022
* chore/meetings_optimization:
  Add touch:true to Follow association with followable
  Fragment cache meetings partial in meetings index
  Bump minimist and node-forge (decidim#9131)
  Bump puma from 5.6.2 to 5.6.4 (decidim#9132)
  Add base URI to meta image URLs (decidim#9125)
  Make Decidim fully configurable via ENV vars part II (decidim#8990)
  Allow assembly admins to manage components in child assemblies (decidim#8955)
  Export calendar improvements (decidim#9035)
  Add reminders for publishing reports to meeting authors (decidim#8757)
  VAPID key generator availabe in core (decidim#9107)
  Dont add external link container inside editor (decidim#9095)
@PierreMesure
Copy link
Copy Markdown
Contributor

Just saw what you did with Sidekiq in this PR! Great job @microstudi! ♥️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: generators type: change PRs that implement a change for an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants