-
Notifications
You must be signed in to change notification settings - Fork 33
Adding docker setup feature #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
hzloc
commented
Aug 16, 2024
- docker setup
mbanck-cd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those could be folded into one apt-get call