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

added docker implementation to the website #537

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/gems
_site
.sass-cache
.jekyll-metadata
.bundle
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM ruby:2.7
Copy link
Member

Choose a reason for hiding this comment

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

Note that we're using ruby 3.3 now.


ENV GLOBAL_GEMS=true

WORKDIR /usr/src/website

RUN git config --global --add safe.directory /usr/src/website && git config --global --add safe.directory /usr/src/website/_sass/brand

RUN gem install 'bundler:~>1' rake

COPY . ./

RUN rake dependencies

CMD ["rake", "dev"]
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ The Student Robotics public website.

## Getting Started

For ease of setup, a Docker container is provided. Simply install Docker and `docker-compose`, and run `docker-compose up`.

Once setup, the site will be accessible on http://localhost:4000/docs/

## Manual

0. [Clone this repo][clone-repo]

1. [Install Ruby 2.7][install-ruby]
Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ end
task :submodules => ['_sass/brand/.git']

task :dev => [:dependencies, :submodules] do
sh('bundle exec jekyll serve --drafts --config _config.yml,_dev.yml')
sh('bundle exec jekyll serve --host 0.0.0.0 --drafts --config _config.yml,_dev.yml')
end

task :build => [:dependencies, :submodules] do
Expand Down
10 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: "2.3"

services:
docs:
build:
context: .
volumes:
- ".:/usr/src/website"
ports:
- "4000:4000"