Commit Graph

289 Commits

Author SHA1 Message Date
Javi Martín
5e5a0c5f65 Update PostgreSQL dependency to version 13
Version 12 isn't maintained since November 2024, and earlier versions
aren't maintained since way before that. Furthermore, we no longer know
whether these versions still work with the latest version of Consul
Democracy.

So we're upgrading the requirements to a version that is still supported
and that's expected to work.
2025-10-17 15:54:42 +02:00
Javi Martín
210a91bd8f Use postgreSQL 14 as postgres Docker image
PostgreSQL 13 will reach its end-of-life on November 13, 2025. So we're
upgrading before that happens.

We're also upgrading to PostgreSQL 14 in our CI. In this case, we're
using the default distribution (Trixie, as of October 2025); it doesn't
affect the development or production environments, so it's OK if use the
default one.
2025-10-17 14:00:52 +02:00
Anamika Aggarwal
86bbfcaa0c Automatically set the redirect URI in OIDC
When we first added OIDC support, we were configuring the redirect URI
in the devise initializer, just like we did for other providers.

Thanks to the changes in the previous commit, that code is no longer in
the devise initializer, which means we can use `url_helpers` to get the
redirect URI.

This means we no longer need to define this URI in the secrets. This is
particularly useful for multitenancy; previously, we had to define the
redirect URI for every tenant because different tenants use different
domains or different subdomains.
2025-10-17 13:46:46 +02:00
Sebastia
086c79993f Merge pull request #6067 from consuldemocracy/update-contribution-docs
Update CONTRIBUTING and README with latest links and suggestions
2025-09-03 14:21:13 +02:00
Anamika Aggarwal
5e263baed2 Add OIDC section for sign in and sign up page
- name: :oidc → Identifier for this login provider in the app.
- scope: [:openid, :email, :profile] → Tells the provider we want the user’s ID (openid), their email, and basic profile info (name, picture, etc.).
- response_type: :code → Uses Authorization Code Flow, which is more secure because tokens are not exposed in the URL.
- issuer: Rails.application.secrets.oidc_issuer → The base URL of the OIDC provider (e.g., Auth0). Used to find its config.
- discovery: true → Automatically fetches the provider’s endpoints from its discovery document instead of manually setting them.
- client_auth_method: :basic → Sends client ID and secret using HTTP Basic Auth when exchanging the code for tokens.

Add system tests for OIDC Auth

Edit the oauth docs to support OIDC auth
2025-08-29 12:20:16 +02:00
Lucía Luzuriaga
42dda087a3 Update CONTRIBUTING and README with latest links and suggestions 2025-08-21 09:45:24 +02:00
Anamika Aggarwal
26df59af02 Add SAML Integration doc to setup secrets file 2025-07-23 14:43:44 +02:00
Javi Martín
b3737ae973 Adjust spacing in OAuth documentation
We're also fixing a missing "/" in one URL.
2025-07-23 14:43:44 +02:00
Lucía Luzuriaga
4ffae5a6fa Add links to OS-specific installation guides in README 2025-06-20 16:58:50 +02:00
Javi Martín
372a1dda3b Update Node.js from 18.20.3 to 20.19.2
Node 18 is reaching its end of life on April 30th, 2025, so we're
updating in order to keep using a maintained version after that date.
2025-05-20 18:17:35 +02:00
Javi Martín
096023dffb Upgrade Ruby to version 3.3.8 2025-05-20 15:56:13 +02:00
Javi Martín
8cada1237c Upgrade Ruby to version 3.2.8 2025-04-01 17:55:28 +02:00
Javi Martín
10a86fd5a4 Update instructions to upgrade Consul Democracy
We now strongly recommend to upgrade one version at a time and to run
the tests before and after upgrading.

Note we use a `release` branch instead of an `upgrade` branch because
we've been mentioning the `release` branch in the release notes of every
release for years.
2025-03-06 17:22:47 +01:00
Sebastia
d84044cd73 Merge pull request #5886 from consuldemocracy/forks_list
Add list of open source forks and modifications
2025-03-05 15:30:27 +00:00
jens
bb79989721 GITBOOK-8: No subject 2025-02-17 12:03:06 +01:00
jens
2844617789 GITBOOK-5: Add list of open source forks 2025-02-17 12:01:06 +01:00
taitus
352f702947 Upgrade Ruby to version 3.2.7 2025-02-14 14:50:57 +01:00
Javi Martín
6f7d4096f5 Add document about our coding conventions
There are some conventions that can't be checked by linters and were not
documented anywhere.
2025-01-13 16:26:42 +01:00
Javi Martín
453c4d2427 Upgrade Ruby to version 3.2.6 2025-01-09 17:15:33 +01:00
Javi Martín
cf6d9ce753 Add Ruby version to Gemfile
Since Bundler 2.4.19, including in Ruby 3.2.3, it's possible to define
the Ruby version in the Gemfile by indicating which file contains the
version [1].

There are at least two practical cases where this is an advantage.

First, people using RVM in development will no longer accidentally run
the application using the wrong Ruby version (which, before these
changes, might happen if they switch to a branch using a different Ruby
version and forget to run `rvm use` or exit the current folder and enter
it again) because they will get an error when trying to do so.

Second, people using services like Heroku no longer need to modify the
Gemfile.

The disadvantage is that, now, every time we update the Ruby version, we
have to remember to run `bundle` so our `Gemfile.lock` gets the new
version.

[1] https://github.com/rubygems/rubygems/releases/tag/bundler-v2.4.19
2025-01-09 17:14:42 +01:00
Emmanuel Ferdman
e844204cf4 Update OS guides references
Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
2024-11-14 07:24:18 -08:00
taitus
4972c51974 Add documentation for multitenancy management mode 2024-11-06 14:46:03 +01:00
Javi Martín
170530e52e Unify database configuration files
We had three files that were almost identical, and we can use
environment variables to specify the differences.

Note we're using the `PGUSER` and `PGPASSWORD` variables, since these
variables will automatically be used by the PostgreSQL client when we
have a blank `username` and `password` keys in the `database.yml` file
(which we did until now). The difference between these variables and the
`POSTGRES_USER` and `POSTGRES_PASSWORD` variables is that the `PG`
variables are used by the client connecting to the database, while the
`POSTGRES_` variables are used by the Docker postgresql image when
creating the database superuser.

For consistency with the code in our github workflows (and everywhere
else in the postgres world), we're respecting this double standard. The
fact that there are two different names for what's basically the same
thing makes the code confusing, though, particularly when running the
docker-compose commands, since we get the password from an environment
variable but we have to assign two different environment variables with
it.

So we're accepting both `PGPASSWORD` and `POSTGRES_PASSWORD` variables
in the database configuration file. This way, developers using
docker-compose can use `POSTGRES_PASSWORD` for everything and it'll work
fine. We're also making `PGPASSWORD` default to `POSTGRES_PASSWORD` so
we don't get a warning if we only set `POSTGRES_PASSWORD`:

```
WARN[0000] The "PGPASSWORD" variable is not set. Defaulting to a blank
string.
```

Also note we're using `DB_HOST` instead of `PGHOST` because that's the
variable Rails currently uses by default for new applications [1].

Finally, note we're using `.presence` in the `ENV` calls in the
database.yml file. The `PGPASSWORD` variable was set to an empty string
when running docker-compose, so using `ENV["PGPASSWORD"] ||` wouldn't
work.

[1] https://github.com/rails/rails/blob/c90a8701e5/railties/lib/rails/generators/rails/app/templates/config/databases/postgresql.yml.tt#L22
2024-10-07 15:23:40 +02:00
Javi Martín
b5d3df5ee5 Fix images layout in user content translations
Depending on the size of the window, these images can look pretty bad
when they're displayed right after some text, since on GitBook they
might appear in the middle of the paragraph.
2024-10-03 14:14:10 +02:00
Sebastia
c6e239b13e Merge pull request #5710 from consuldemocracy/user_content_translations_docs
Update user content translations documentation
2024-10-02 16:02:18 +02:00
taitus
9c191890ae Improve user content translations docs
Note that a step suggesting to run a rake task has been removed,
which is no longer necessary.
2024-10-02 15:59:38 +02:00
Sebastia
255e0c963e Merge pull request #5709 from consuldemocracy/local_census_docs
Update local census documentation
2024-10-02 14:00:51 +02:00
taitus
f5f4eefc58 Improve local census documentation 2024-10-02 12:50:21 +02:00
Sebastia
7f5dff278e Merge pull request #5708 from consuldemocracy/configure_census_conection_docs
Update remote census configuration documentation
2024-10-02 12:02:19 +02:00
taitus
d23b1e9856 Update remote census configuration docs
Remove some unhelpful images from the documentation.
2024-10-02 11:57:15 +02:00
Sebastia
3b41a6610f Merge pull request #5707 from consuldemocracy/oauth-docs
Update OAuth documentation
2024-09-30 19:30:19 +02:00
taitus
bd6bdfcff8 Improve oauth docs 2024-09-30 19:28:06 +02:00
Sebastia
4114dcfb9d Merge pull request #5696 from consuldemocracy/servers-docs
Update documentation for Production and Staging servers
2024-09-30 19:19:06 +02:00
taitus
ff74960ba3 Update mail server configuration instructions 2024-09-30 18:25:07 +02:00
taitus
c267679aeb Update Heroku instructions
Note that the variable related with the "hostname" is removed
from the Heroku instructions as it is not necessary to configure
the Bucket.
2024-09-30 18:25:07 +02:00
taitus
c27a32a5f3 Update digital ocean instructions 2024-09-30 18:25:07 +02:00
taitus
6316938e3b Update manual installation instructions 2024-09-30 18:25:07 +02:00
taitus
cee4f3f027 Update ssh key instructions 2024-09-30 18:25:07 +02:00
taitus
d425b88f26 Update create deploy user instructions 2024-09-30 18:25:07 +02:00
taitus
81ab194831 Update installer installation instructions 2024-09-30 18:25:07 +02:00
taitus
ac23dc162f Update servers installation instructions 2024-09-30 18:25:07 +02:00
Javi Martín
d00b431f58 Move GraphQL code examples to the GraphQL docs
While this leads to a bit of duplication, since now the same code is in
both the Spanish and English texts, and it makes it harder to actually
run the code, it'll make it easier for people reading the documentation
to find the code, and we get rid of the confusingly-named `doc/` folder.
2024-09-30 12:09:08 +02:00
Javi Martín
a5aa39f6e2 Update GraphQL documentation
We don't use the `config/api.yml` file since commit c984e666f, and the
`.delete("\n").delete(" ")` in the code examples isn't necessary (we
should have probably added it in commit 56e42f209).

We're also changing the responses so there are no references to any
specific city.
2024-09-30 12:09:08 +02:00
cyrillefr
18323a36c3 Add new GraphQL type for milestones
- added the milestone type to be displayed with investments
- the corresponding spec
2024-09-30 11:14:01 +02:00
cyrillefr
5ec6337d47 Add new GraphQL types for budget investments
- added 2 new types
- modified the models to get data through graphQL
- modified the corresponding spec
- also testing that hidden comments do not show up
- modified comments specs bc now it returns comments on budget
  investments
2024-09-30 11:14:01 +02:00
Javi Martín
08cceceed8 Update multitenancy documentation
Most of it was up-to-date, except for the fact that Consul Democracy
already uses Rails 7.0 and that it's possible to use different languages
per tenant since commit 6de4737b7.
2024-09-24 18:47:13 +02:00
Javi Martín
32d9118d1e Fix typos in multitenancy documentation 2024-09-24 18:47:13 +02:00
Javi Martín
8277336a7e Merge pull request #5697 from consuldemocracy/recommendation_docs
Update recommendations documentation
2024-09-20 14:32:27 +02:00
Javi Martín
d86299f44d Add documentation to run tests with Docker 2024-09-19 15:41:32 +02:00
Javi Martín
b3facb39bf Don't use an image to show the results of docker ps
The alternative text of the image was useless, and we were depending on
an external server in order to display it. Furthermore, the text inside
the image was pretty small.

So we're displaying the output of the command as plain text.
2024-09-19 15:20:38 +02:00