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

Readme build instructions #410

Open
wants to merge 4 commits into
base: source
Choose a base branch
from
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 35 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,41 @@ Best practice workflow for contributing to site changes
``make docker-gh-preview``

to build the website inside a docker container with all the correct
dependencies and configuration taken care of automagically.
dependencies and configuration taken care of automagically. Once this
is done, navigate into the gh-build directory and serve the website.


::

cd gh-build
python3 -m http:server <port number>


the most common port number for things like this is 8000, or 8080,
and as such choosing one of these is recommended:

``python3 -m http:server 8000``

If you are building the website on a computer which you are
Copy link
Member

Choose a reason for hiding this comment

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

I think there are too issues here. In general, you could access the remote machine directly as:

https://remote.machine:8000

But if that remote machine is behind a firewall then you will need port-forwarding as well.

Copy link
Author

Choose a reason for hiding this comment

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

Huh, I didn't know you could access remote machines like that. You're saying that for, say, non-UW machines you'd be able to just connect to your remote machine's IP: to see the page (assuming there wasn't some other firewall)? I've never done that method before, and so I'm not totally certain how it works. However, especially for our workflow here at UW the method I outlined gets the job done. This leads me to wonder how big the Venn diagram intersection of "people who want to contribute to the website who aren't associated with UW" and "people who want to build the website on a remote machine and access it through a local machine" is. Let me know if you think it's worth it for me to write a little section about what to do in that case. I THINK what I wrote will work for all cases, so maybe it's best to just leave that as the default instruction (I'm not aware of any big issue with doing ssh -L 8000:localhost:8000 [email protected], but I'm also not an expert).

connected to remotely, it will then be necessary to create a tunnel
between your local and remote machines. This can be done with:

``ssh -L <port number>:localhost:<port number> username@remote``

So if using port 8000 as in the example above, and connecting to a
remote machine which you had listed in your config file as "remote-machine"
the command would look something like this:

``ssh -L 8000:localhost:8000 username@remote-machine``

Finally, connect to the website on your computer by opening a browser
and going to:

``http://localhost:<port number>``

which in the example above would look like:

``http://loaclhost:8000``

6. Repeat steps 4-5 until satisfied.

Expand Down
Loading