Skip to content

Use PostgreSQL in Docker containers#410

Merged
intjftw merged 1 commit intoEricsson:masterfrom
mcserep:docker_pgsql
Jul 31, 2020
Merged

Use PostgreSQL in Docker containers#410
intjftw merged 1 commit intoEricsson:masterfrom
mcserep:docker_pgsql

Conversation

@mcserep
Copy link
Collaborator

@mcserep mcserep commented Jul 25, 2020

The libodb-pgsql-dev dependency is missing from the new Ubuntu 20.04 docker images.
PostgreSQL supersedes SQLite in performance, therefore we shall support it also in the docker images for production systems.

@mcserep mcserep added Kind: Bug ⚠️ Target: Developer environment Developer environment issues consist of CodeCompass or 3rd-party build tooling, configuration or CI. labels Jul 25, 2020
@mcserep mcserep added this to the Release Flash milestone Jul 25, 2020
@mcserep mcserep requested review from bruntib and whisperity July 25, 2020 21:30
@mcserep mcserep mentioned this pull request Jul 26, 2020
5 tasks
@whisperity
Copy link
Contributor

The libodb-pgsql-dev dependency is missing from the new Ubuntu 20.04 docker images.

Ah, at first I thought you mean this in a way that they are gone from the upstream...

@whisperity
Copy link
Contributor

Is installing libodb-pgsql-dev enough to have the ability to connect to a remote postgresql host? The changes in the patch don't bring in the ability to run PgSQL to the image.

@mcserep
Copy link
Collaborator Author

mcserep commented Jul 26, 2020

Is installing libodb-pgsql-dev enough to have the ability to connect to a remote postgresql host? The changes in the patch don't bring in the ability to run PgSQL to the image.

The web image contains postgresql-server-dev-12, but the dev image does not contain it, because it neither did before.
Would it be required, shall we add it? I would assume that libodb-pgsql-dev contains everything required to use ODB with PostgreSQL.

@whisperity
Copy link
Contributor

libodb-pgsql-dev depends on libodb-pgsql-2.4 which in turn depends on libpq5, so we're good.

@bruntib
Copy link
Collaborator

bruntib commented Jul 29, 2020

Lacking PostgreSQL from the development image was half-intentional. For CodeCompass development SQLite could be enough. Anyway if we want to support our Docker image to work with PosgreSQL, then shouldn't it connect to a database running on the host machine or in a PostgreSQL Docker container? Maybe the extension of the documentation would also be useful on how to do it.

@mcserep
Copy link
Collaborator Author

mcserep commented Jul 29, 2020

Lacking PostgreSQL from the development image was half-intentional. For CodeCompass development SQLite could be enough. Anyway if we want to support our Docker image to work with PosgreSQL, then shouldn't it connect to a database running on the host machine or in a PostgreSQL Docker container? Maybe the extension of the documentation would also be useful on how to do it.

I agree and have very similar configuration myself in production: CodeCompass running in docker, PostgreSQL server running on the host machine.

But libodb-pgsql-2.4 is required to compile CodeCompass in the first place. The dev image is used to build CodeCompass for the web image. If the dev image does not contain libodb-pgsql-2.4, the web image will currently fail to build when CC_DATABASE is set to pgsql. That is a valid configuration currently and therefore this is a bug.

@intjftw intjftw merged commit db95b30 into Ericsson:master Jul 31, 2020
@mcserep mcserep deleted the docker_pgsql branch August 26, 2020 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Kind: Bug ⚠️ Kind: Support ℹ️ Target: Developer environment Developer environment issues consist of CodeCompass or 3rd-party build tooling, configuration or CI.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants