diff --git a/Dockerfile.static b/Dockerfile.static new file mode 100644 index 000000000..94d806cb8 --- /dev/null +++ b/Dockerfile.static @@ -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 diff --git a/Gemfile b/Gemfile index 1b175cfc6..c96d2b85e 100644 --- a/Gemfile +++ b/Gemfile @@ -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 diff --git a/Gemfile.lock b/Gemfile.lock index a7bcf92d3..040bac565 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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) @@ -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 diff --git a/bin/static b/bin/static new file mode 100755 index 000000000..0aea623f8 --- /dev/null +++ b/bin/static @@ -0,0 +1,3 @@ +#!/bin/bash +cd static +bundle exec sass --compass --scss -I $(dirname $(dirname $(gem which susy))) --trace --watch sass:sass diff --git a/docker-compose.yml b/docker-compose.yml index 1f5ea36b4..0d5bd0bfd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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