Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix docker install#5381

Merged
amercader merged 1 commit into
ckan:masterfrom
mediasuitenz:fix-docker-install
Sep 2, 2020
Merged

Fix docker install#5381
amercader merged 1 commit into
ckan:masterfrom
mediasuitenz:fix-docker-install

Conversation

@markstuart
Copy link
Copy Markdown
Contributor

I attempted to install the master (2.9.0a) version of CKAN using docker, but was seeing errors in the logs when running docker-compose logs -f. The ckan container would exit almost immediately after starting.

The only similar info I can see in issues is this comment by @kowh-ai #5243 (comment)

I haven't raised an accompanying issue, I chose to hopefully provide a fix instead.

Proposed fixes:

Docker installation instructions for 2.9.0a should now work as expected.

Features:

  • includes tests covering changes
  • includes updated documentation
  • includes user-visible changes
  • includes API changes
  • includes bugfix for possible backport

Please [X] all the boxes above that apply

Comment thread Dockerfile Outdated
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.

I added a symlink to the ckan cli here, similar to what has been done in the past for ckan-paster.

Questions:

  • Are we happy with just ckan, or maybe ckan-cli?
  • Do we want to remove the ckan-paster symlink?

Comment thread Dockerfile Outdated
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.

Had to set the host to 0.0.0.0 to allow host network to access the server in the container. The ckan run command defaults to localhost if --host is not provided.

Comment thread ckan/cli/__init__.py Outdated
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.

Not really sure how this is working for anyone else? This looks to be way that this library is imported in other parts of the project.

Comment thread ckan/cli/generate.py Outdated
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.

Since this was in the @generate decorator previously, it was also being applied when running ckan generate config.

The config command does not need cookiecutter, and should not need to load the dev-requirements in order to generate the config file for a new install.

@markstuart markstuart force-pushed the fix-docker-install branch from 4d4f142 to 4f4ffc0 Compare May 13, 2020 22:40
@markstuart
Copy link
Copy Markdown
Contributor Author

markstuart commented May 13, 2020

Please note that I'm seeing the issue described in #4715 (FATAL: role "postgres" does not exist) output in the docker logs every 30 seconds or so, but everything seems to still be working as expected.

@kowh-ai
Copy link
Copy Markdown
Contributor

kowh-ai commented May 14, 2020

@smotornyuk -- hey what was the PR mentioned at the Dev meeting today that (may be) updating ckan/cli/generate.py ? I missed that one - thanks Sergey

@smotornyuk
Copy link
Copy Markdown
Member

#5150 - this one

@kowh-ai
Copy link
Copy Markdown
Contributor

kowh-ai commented May 15, 2020

@markstuart - thanks for your work here - did you also change the ckan-entrypoint.sh file in your branch?

@kowh-ai
Copy link
Copy Markdown
Contributor

kowh-ai commented May 15, 2020

Ah - yes I see the 2 changes in the ckan-entrypoint.sh you made - great - this works for me

@markstuart
Copy link
Copy Markdown
Contributor Author

Yep, just updated to use the new ckan CLI commands 👍

Copy link
Copy Markdown
Contributor

@kowh-ai kowh-ai left a comment

Choose a reason for hiding this comment

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

I have successfully downloaded/built the 2.9 docker images, run the containers and tested a login - all work fine - Maybe one of the Core Dev's @amercader or @smotornyuk could check the changes in the Python code to see if they are happy

@markstuart markstuart force-pushed the fix-docker-install branch from 4f4ffc0 to 272b30a Compare May 15, 2020 12:43
@markstuart
Copy link
Copy Markdown
Contributor Author

I see master has moved on a bit since I raised this PR, and there were some conflicts due to @amercader merging #5150. I've rebased my branch on top of master and fixed the conflicts.

@amercader amercader self-assigned this May 19, 2020
paster is still there, but doesn't load all the
commands that are needed

Also prevents an error message being thrown about
needing to pip install dev-requirements

Using 0.0.0.0 instead of localhost in docker so that
we can access exposed port from outside the container
@kowh-ai
Copy link
Copy Markdown
Contributor

kowh-ai commented Sep 2, 2020

@amercader - Hey can we get this PR merged?...it works fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants