Skip to content

Commit

Permalink
add a static container for handling local frontend dev
Browse files Browse the repository at this point in the history
  • Loading branch information
ewdurbin committed Sep 30, 2024
1 parent 89ae28c commit 350b15e
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 11 deletions.
10 changes: 10 additions & 0 deletions Dockerfile.static
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM ruby:2.7.8-bullseye AS static

RUN mkdir /code
WORKDIR /code

COPY Gemfile Gemfile.lock /code/

RUN bundle install

COPY . /code
6 changes: 3 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
source "https://rubygems.org"

group :media do
gem "compass", "~>0.12.2"
gem "sass", "~>3.2.5"
gem "susy", "~>1.0.5"
gem "compass", "~>0.12.7"
gem "sass", "~>3.2.19"
gem "susy", "~>1.0.9"
end

group :development do
Expand Down
19 changes: 11 additions & 8 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
GEM
remote: https://rubygems.org/
specs:
chunky_png (1.2.7)
compass (0.12.2)
chunky_png (1.4.0)
compass (0.12.7)
chunky_png (~> 1.2)
fssm (>= 0.2.7)
sass (~> 3.1)
sass (~> 3.2.19)
foreman (0.61.0)
thor (>= 0.13.6)
fssm (0.2.10)
sass (3.2.6)
susy (1.0.5)
sass (3.2.19)
susy (1.0.9)
compass (>= 0.12.2)
sass (>= 3.2.0)
thor (0.17.0)
Expand All @@ -19,7 +19,10 @@ PLATFORMS
ruby

DEPENDENCIES
compass (~> 0.12.2)
compass (~> 0.12.7)
foreman (~> 0.61.0)
sass (~> 3.2.5)
susy (~> 1.0.5)
sass (~> 3.2.19)
susy (~> 1.0.9)

BUNDLED WITH
2.1.4
3 changes: 3 additions & 0 deletions bin/static
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
cd static
bundle exec sass --compass --scss -I $(dirname $(dirname $(gem which susy))) --trace --watch sass:sass
7 changes: 7 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ services:
test: ["CMD", "redis-cli","ping"]
interval: 1s

static:
command: bin/static
build:
dockerfile: Dockerfile.static
volumes:
- .:/code

web:
build: .
image: pythondotorg:docker-compose
Expand Down

0 comments on commit 350b15e

Please sign in to comment.