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 all 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
30 changes: 25 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,44 @@ 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`)

#### 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"`
- `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

### Running in a container

To run this site in a container, make sure you have either [Podman](https://podman.io) or [Docker](https://docker.com) installed.

First, build the container with the following command

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

Then, run the container with the following command

```
podman run -p 8080:80 -it public-site:latest
```

The site should now serve locally at `localhost:8080`. Note that it will not update when you make changes. You will have to stop the container and rebuild it to see your changes

## 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