Skip to content
Draft
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
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.5
3.2.7
41 changes: 41 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Use a slim Ruby image as the base
FROM ruby:3.2.7-slim

# Set environment variables for UTF-8 encoding and non-interactive package installation
ENV LANG=C.UTF-8 \
LC_ALL=C.UTF-8 \
DEBIAN_FRONTEND=noninteractive

# Get NodeJS
COPY --from=node:20-slim /usr/local/bin /usr/local/bin

# Get npm
COPY --from=node:20-slim /usr/local/lib/node_modules /usr/local/lib/node_modules

# Install essential build tools and dependencies
RUN apt-get update && apt-get install -y \
build-essential \
git \
curl \
&& rm -rf /var/lib/apt/lists/*

# Set the working directory inside the container
WORKDIR /usr/src/app

# Copy the Gemfile and Gemfile.lock
COPY Gemfile* ./

# Install Bundler and project dependencies
RUN gem install bundler && bundle install

COPY package.json ./
RUN npm install

# Copy the rest of the source code
COPY . .

# Expose port 4000
EXPOSE 4000

# Start the Jekyll development server with live reloading
CMD ["bundle", "exec", "jekyll", "serve", "--host", "0.0.0.0", "--watch"]
9 changes: 9 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@ GEM
ethon (0.16.0)
ffi (>= 1.15.0)
eventmachine (1.2.7)
ffi (1.17.1-aarch64-linux-gnu)
ffi (1.17.1-arm64-darwin)
forwardable-extended (2.6.0)
google-protobuf (4.29.3-aarch64-linux)
bigdecimal
rake (>= 13)
google-protobuf (4.29.3-arm64-darwin)
bigdecimal
rake (>= 13)
Expand Down Expand Up @@ -75,6 +79,8 @@ GEM
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.4.0)
nokogiri (1.18.2-aarch64-linux-gnu)
racc (~> 1.4)
nokogiri (1.18.2-arm64-darwin)
racc (~> 1.4)
parallel (1.26.3)
Expand All @@ -96,6 +102,8 @@ GEM
rspec-support (~> 3.13.0)
rspec-support (3.13.2)
safe_yaml (1.0.5)
sass-embedded (1.83.4-aarch64-linux-gnu)
google-protobuf (~> 4.29)
sass-embedded (1.83.4-arm64-darwin)
google-protobuf (~> 4.29)
terminal-table (3.0.2)
Expand All @@ -108,6 +116,7 @@ GEM
zeitwerk (2.7.1)

PLATFORMS
aarch64-linux
arm64-darwin-21
arm64-darwin-22
arm64-darwin-23
Expand Down
12 changes: 12 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
services:
jekyll:
image: uswds-site:latest
build:
context: .
volumes:
- .:/usr/src/app
- /usr/src/app/_site
ports:
- "4000:4000"
command: >
sh -c "bundle exec jekyll serve --drafts --future --livereload --incremental --host 0.0.0.0 && npx gulp watch"