Skip to content

Commit

Permalink
Started to update and write dockers files to make this run
Browse files Browse the repository at this point in the history
  • Loading branch information
TobySaundersGDS committed Jun 19, 2024
1 parent 1a97e95 commit 51eb54c
Show file tree
Hide file tree
Showing 6 changed files with 95 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.7
2.8
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM ruby:3.2.2-buster

EXPOSE 4567:4567
EXPOSE 35729:35729

WORKDIR /usr/src/gems

COPY ./Gemfile /usr/src/gems
COPY ./Gemfile.lock /usr/src/gems
COPY ./.ruby-version /usr/src/gems

RUN apt-get update && apt-get install -y nodejs

RUN bundle config set force_ruby_platform true

RUN bundle install

WORKDIR /usr/src/docs


CMD [ "bundle", "exec", "--gemfile=/usr/src/gems/Gemfile", "middleman", "server" ]
4 changes: 4 additions & 0 deletions DockerfileAWS
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM nginx:mainline-alpine

COPY build /usr/share/nginx/html
COPY nginx.conf /etc/nginx/nginx.conf
50 changes: 39 additions & 11 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
GEM
remote: https://rubygems.org/
specs:
Ascii85 (1.1.1)
activesupport (7.0.7.2)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0)
afm (0.2.2)
async (2.11.0)
console (~> 1.25, >= 1.25.2)
fiber-annotation
io-event (~> 1.5, >= 1.5.1)
timers (~> 4.1)
autoprefixer-rails (10.4.7.0)
execjs (~> 2)
backports (3.23.0)
bigdecimal (3.1.8)
chronic (0.10.2)
chunky_png (1.4.0)
coffee-script (2.4.1)
Expand All @@ -31,19 +39,27 @@ GEM
compass-import-once (1.0.5)
sass (>= 3.2, < 3.5)
concurrent-ruby (1.2.2)
console (1.25.2)
fiber-annotation
fiber-local (~> 1.1)
json
contracts (0.16.1)
dotenv (2.8.1)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
erubis (2.7.0)
ethon (0.14.0)
ethon (0.16.0)
ffi (>= 1.15.0)
eventmachine (1.2.7)
execjs (2.8.1)
fast_blank (1.0.1)
fastimage (2.2.6)
ffi (1.15.5)
fiber-annotation (0.2.0)
fiber-local (1.1.0)
fiber-storage
fiber-storage (0.1.1)
govuk_tech_docs (3.3.0)
autoprefixer-rails (~> 10.2)
chronic (~> 0.10.2)
Expand All @@ -62,25 +78,28 @@ GEM
tilt
hamster (3.0.0)
concurrent-ruby (~> 1.0)
hashery (2.1.2)
hashie (3.6.0)
html-proofer (3.19.2)
html-proofer (5.0.9)
addressable (~> 2.3)
mercenary (~> 0.3)
nokogumbo (~> 2.0)
parallel (~> 1.3)
async (~> 2.1)
nokogiri (~> 1.13)
pdf-reader (~> 2.11)
rainbow (~> 3.0)
typhoeus (~> 1.3)
yell (~> 2.0)
zeitwerk (~> 2.5)
http_parser.rb (0.8.0)
i18n (1.6.0)
concurrent-ruby (~> 1.0)
io-event (1.5.1)
json (2.7.2)
kramdown (2.4.0)
rexml
listen (3.7.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
memoist (0.16.2)
mercenary (0.4.0)
middleman (4.4.3)
coffee-script (~> 2.2)
haml (>= 4.0.5, < 6.0)
Expand Down Expand Up @@ -139,11 +158,9 @@ GEM
mini_portile2 (2.8.0)
minitest (5.19.0)
multi_json (1.15.0)
nokogiri (1.13.10)
nokogiri (1.14.5)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
nokogumbo (2.0.5)
nokogiri (~> 1.8, >= 1.8.4)
openapi3_parser (0.9.2)
commonmarker (~> 0.17)
padrino-helpers (0.15.1)
Expand All @@ -153,19 +170,26 @@ GEM
padrino-support (0.15.1)
parallel (1.22.1)
parslet (2.0.0)
pdf-reader (2.12.0)
Ascii85 (~> 1.0)
afm (~> 0.2.1)
hashery (~> 2.0)
ruby-rc4
ttfunk
public_suffix (5.0.1)
racc (1.6.1)
rack (2.2.6.4)
rack-livereload (0.3.17)
rack
rainbow (3.0.0)
rainbow (3.1.1)
rake (13.0.6)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
redcarpet (3.5.1)
rexml (3.2.5)
rouge (3.30.0)
ruby-rc4 (0.1.5)
sass (3.4.25)
sassc (2.4.0)
ffi (~> 1.9)
Expand All @@ -176,16 +200,20 @@ GEM
temple (0.9.1)
thor (1.2.1)
tilt (2.0.11)
timers (4.3.5)
toml (0.3.0)
parslet (>= 1.8.0, < 3.0.0)
typhoeus (1.4.0)
ttfunk (1.8.0)
bigdecimal (~> 3.1)
typhoeus (1.4.1)
ethon (>= 0.9.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
uglifier (3.2.0)
execjs (>= 0.3.0, < 3)
webrick (1.7.0)
yell (2.2.2)
zeitwerk (2.6.14)

PLATFORMS
ruby
Expand Down
24 changes: 24 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
events {}
http {
server {
listen 80;
root /usr/share/nginx/html;
location / {
try_files $uri $uri/index.html =404;
}
error_page 404 /404/index.html;
location = /404/index.html {
root /usr/share/nginx/html;
internal;
}
rewrite ^/.well-known/security.txt$ https://vdp.cabinetoffice.gov.uk/.well-known/security.txt permanent;
rewrite ^/.well-known/thanks.txt$ https://vdp.cabinetoffice.gov.uk/.well-known/thanks.txt permanent;
}

include mime.types;
default_type application/octet-stream;
gzip_types text/plain text/xml text/css
text/comma-separated-values
text/javascript application/x-javascript
application/atom+xml;
}
6 changes: 6 additions & 0 deletions preview-with-docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#! /bin/bash
set -e

docker build . --tag di-team-manual

docker run --rm -p 4567:4567 -p 35729:35729 -v $(pwd):/usr/src/docs -it di-team-manual

0 comments on commit 51eb54c

Please sign in to comment.