Skip to content
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

WIP: Attempt to run schemaorg instance through Docker #2621

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

stain
Copy link

@stain stain commented Jun 30, 2020

Here is my successful attempt of running the schemaorg appengine server through Docker, as I could not find any instructions on how to get the Python dependencies of runpythonapp.sh installed locally (requirements.txt anyone?) but loads of Devs know how to run Docker.

I mark this as WIP as it for now only works with docker run --net=host as I could not find any instructions on modifying the scripts to do equivalent of --host=0.0.0.0. There are also too many hardcoded instances of localhost. The side-effect is that this docker method only works on Linux for now, as you need to bind 0.0.0.0 to escape the container.

It would also be nice if there was a way to disable the interactive prompting and put it straight in local mode - perhaps someone more knowledgable with the runpythonapp.sh can suggest better command line args that the container can start?

@stain
Copy link
Author

stain commented Jun 30, 2020

Link to issue #2602 and #1903

@stain stain marked this pull request as draft July 1, 2020 10:22
@RichardWallis
Copy link
Contributor

I could make some comment on this if I were viewing it in context.

Have you got a step-by-step set of instructions that can take me from an empty Linux environment to this point, via getting a container with the right Python (2.7), schemaorg source ?

@stain
Copy link
Author

stain commented Jul 7, 2020

This Dockerfile will do exactly that, but based on google/cloud-sdk base image so that the tricky bit of installing the cloud-sdk and Python 2.x is already there.

Then the host machine can run whatever Python it wants (or none), as it just needs Docker or Singularity to run this container.

We could then look at publishing this on https://hub.docker.com/ then the users would not even need to do the "docker build" step.

However where I need help is to fix so that runpythonapp.sh that is launched by RUN ideally:

  • Binds to 0.0.0.0 so it's accessible outside the container (particularlty important on Windows/Mac that use VMs)
  • Don't stop with interactive questions

@stain
Copy link
Author

stain commented Jul 7, 2020

https://github.com/schemaorg/schemaorg/blob/master/.travis.yml#L13 does something similar, but is only directly runnable by Travis.

@RichardWallis RichardWallis changed the base branch from master to main July 23, 2020 13:03
@github-actions
Copy link

This pull request is being tagged as Stale due to inactivity.

@github-actions github-actions bot added the no-pr-activity Discuss has gone quiet. Auto-tagging to encourage people to re-engage with the issue (or close it!). label Sep 22, 2020
@christianlupus
Copy link

@stain, may I ask you what your goal is with the docker image? Building the site page locally, viewing the locally built page in a dev server or publishing to google cloud? IIf I look at the SOFTWARE_README, I do not find anything related to a file runpythonapp.sh.

@RichardWallis
Copy link
Contributor

Ahead of the upcoming V11 release, there have been some changes in the local development environment to remove some old dependencies, move to Python 3, simplify things a little, and reflect the fact that the objective has moved over time to produce a static version of the site for deployment to cloud hosting. These were introduced in PR #2706

This WIP activity has yet to reflect these changes.

@stain - In this updated dev environment runpythonapp.sh has effectively been replaced by devserv.py which accepts commandline arguments for host and port. See the updated SOFTWARE_README for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-pr-activity Discuss has gone quiet. Auto-tagging to encourage people to re-engage with the issue (or close it!).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants