-
Notifications
You must be signed in to change notification settings - Fork 145
Add a Docker-based setup. #600
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM ruby:2.7.5 | ||
|
||
# We need Node.js for the `execjs` gem, used by `_plugins/tokenize.rb` | ||
RUN apt install -y curl | ||
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - | ||
RUN apt install -y nodejs | ||
|
||
RUN gem install bundler:2.3.10 | ||
|
||
WORKDIR /srv/jekyll | ||
|
||
COPY Gemfile . | ||
COPY Gemfile.lock . | ||
|
||
RUN chmod u+s /bin/chown | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 😨 😨 |
||
RUN bundle install |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
version: '2' | ||
|
||
services: | ||
jekyll: | ||
user: "${UID}:${GID}" | ||
build: . | ||
command: sh -c "chown $UID / && bundle exec jekyll serve --watch --host=0.0.0.0 " | ||
ports: | ||
- '4000:4000' | ||
volumes: | ||
- .:/srv/jekyll | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of doing the usual UID hackery, have you considered:
For fully building the website (to deploy), I suggest There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To be honest, I have no idea what I'm doing. I have 0 Docker knowledge. I copy-pasted from the setup for scala-lang which is at https://github.com/scala/scala-lang/blob/main/docker-compose.yml 🤷♂️ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. :) that's pretty much how this looked 😹 If this is not super urgent, I can make an alternative suggestion (I use docker daily now). If yes, I'd appreciate a quick description of your deployment process to make sure I'm not making it worse. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's not urgent at all. I only use it locally. I can keep it local until there's something good. The deployment is still working Docker-free in GitHub Actions. It's in https://github.com/scala-js/scala-js-website/blob/main/.github/workflows/deploy.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need Node.js as well to build the website?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. We need it for one the plugins, which calls into JS for some reason. I added a comment.