Conversation
hzloc
commented
Aug 16, 2024
- docker setup
mbanck-cd
left a comment
There was a problem hiding this comment.
Hi,
thanks for the Docker setup! I finally got around to review it and have a few comments
| #!/bin/sh | ||
| set -eux | ||
|
|
||
| psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL |
There was a problem hiding this comment.
Where is $POSTGRES_DB coming from, I don't see it set anywhere else?
| environment: | ||
| POSTGRES_PASSWORD: omdbmovies | ||
| POSTGRES_USER: omdbmovies | ||
| POSTGRES_NAME: omdbmovies |
There was a problem hiding this comment.
Was that supposed to be POSTGRES_DB (see below)?
| POSTGRES_USER: omdbmovies | ||
| POSTGRES_NAME: omdbmovies | ||
| ports: | ||
| - "54325:5432" No newline at end of file |
There was a problem hiding this comment.
Is that 54325 port intentional? Wouldn't that need additional documentation on how to reach Postgres inside the container?
| CREATE DATABASE demo; | ||
| GRANT ALL PRIVILEGES ON DATABASE demo TO docker; |
There was a problem hiding this comment.
This demo database does not seem to get used anywhere?
Probably creating and using a omdb database would be better?
| @@ -0,0 +1,11 @@ | |||
| FROM postgres:14.5 | |||
There was a problem hiding this comment.
I know it's been a while, but the Postgres version should be bumped to something newer (or latest?)
| FROM postgres:14.5 | ||
| # requirements to run ./download | ||
| RUN apt-get update | ||
| RUN apt-get install -y wget && apt-get install -y bzip2 |
There was a problem hiding this comment.
Those could be folded into one apt-get call