Skip to content

fix(postgresql container): fix container permissions at startup#189

Merged
xmnlab merged 9 commits intothegraphnetwork:mainfrom
luabida:fix-psql-cont
May 17, 2023
Merged

fix(postgresql container): fix container permissions at startup#189
xmnlab merged 9 commits intothegraphnetwork:mainfrom
luabida:fix-psql-cont

Conversation

@luabida
Copy link
Copy Markdown
Contributor

@luabida luabida commented May 15, 2023

fix #187

@luabida luabida requested a review from xmnlab May 15, 2023 21:54
@luabida luabida marked this pull request as draft May 15, 2023 21:57
- ../.env
ports:
- ${POSTGRES_PORT}:${POSTGRES_PORT}
user: "${HOST_UID:-1000}:${HOST_GID:-1000}"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

any reason for removing this line?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

postgres user has been properly configured with correct ID and GUI and the container initiates with this user here

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

oh, that is right .. sorry .. I missed that it was about the postgres service XD
good catch!

POSTGRES_USER: ${POSTGRES_USER}
PGDATA: /var/lib/postgresql/data/pgdata
volumes:
- ${POSTGRES_CONFIG_FILE_HOST}:/etc/postgresql/postgresql.conf:ro
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

maybe you need to add this variable to .env.tpl and to CI:
https://github.com/thegraphnetwork/EpiGraphHub/pull/189/checks#step:11:1180

@luabida
Copy link
Copy Markdown
Contributor Author

luabida commented May 16, 2023

postgres_1  | 2023-05-16 13:02:11.506 GMT [1] LOG:  unrecognized configuration parameter "stats_temp_directory" in file "/var/lib/postgresql/data/pgdata/postgresql.conf" line 494
postgres_1  | 2023-05-16 13:02:11.506 GMT [1] FATAL:  configuration file "/var/lib/postgresql/data/pgdata/postgresql.conf" contains errors

stats_temp_directory is deprecated, ref: https://postgresqlco.nf/doc/en/param/stats_temp_directory/

- ../.env
ports:
- ${POSTGRES_PORT}:${POSTGRES_PORT}
user: "${HOST_UID:-1000}:${HOST_GID:-1000}"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

oh, that is right .. sorry .. I missed that it was about the postgres service XD
good catch!

run: |
export HOST_UID=$(id -u)
export HOST_GID=$(id -g)
export POSTGRES_HOST_UID=$(id -u)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

prod has a different user for postgres

@luabida luabida marked this pull request as ready for review May 17, 2023 16:53
@luabida luabida requested a review from xmnlab May 17, 2023 16:53
@xmnlab
Copy link
Copy Markdown
Member

xmnlab commented May 17, 2023

in general, LGTM! just check the error on CI, please

@luabida
Copy link
Copy Markdown
Contributor Author

luabida commented May 17, 2023

Done

@xmnlab xmnlab merged commit 4eb3923 into thegraphnetwork:main May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Chomedriver initializes in different ports, crashing selenium tests on CI

2 participants