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

Updated instructions for running locally #346

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
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
31 changes: 20 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,33 @@ This site is written using [Jekyll](https://jekyllrb.com/), a static site genera
## Local Development

#### Prerequisites:
1. [Ruby](https://www.ruby-lang.org/en/documentation/installation/)
2. [Bundler](https://bundler.io/) (`gem install bundler`)

1. [Docker](https://docker.com) or [Podman](https://podman.io)

#### Instructions
1. `bundle install`
2. Add necessary environment variables (they MUST be defined!!!):
* `export CSHPUBSITE_ASSETS_URL="https://assets.csh.rit.edu/pubsite"`
* `export CSHPUBSITE_S3_URL="https://s3.csh.rit.edu"`
3. `bundle exec jekyll serve`

The site should now serve locally at `localhost:4000`, and auto-build when you change/create files in the repo!
Mstrodl marked this conversation as resolved.
Show resolved Hide resolved
First, run the following command in the directory containing the Dockerfile to build the container

```
podman build -t public-site .
```

Next, run the following command to start the container

```
podman run -p 8080:80 public-site:latest
mxmeinhold marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

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

Actually, can you make this podman run -p 8080:80 -it public-site? That way, people don't get stuck when ctrl-c doesn't work.

```

The site should now serve locally at `localhost:8080`.

**Note**: If you are using Docker instead of Podman, replace `podman` in each command with `docker`

## Contributing

1. [Fork](https://help.github.com/en/articles/fork-a-repo) this repository
- Optionally create a new [git branch](https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell) if your change is more than a small tweak (`git checkout -b BRANCH-NAME-HERE`)
3. Make your changes locally, commit, and push to your fork
4. Create a [Pull Request](https://help.github.com/en/articles/about-pull-requests) on this repo for our Webmasters to review
- Optionally create a new [git branch](https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell) if your change is more than a small tweak (`git checkout -b BRANCH-NAME-HERE`)
2. Make your changes locally, commit, and push to your fork
3. Create a [Pull Request](https://help.github.com/en/articles/about-pull-requests) on this repo for our Webmasters to review

## Questions/Concerns

Expand Down