Skip to content

Commit

Permalink
Specify explicit chromium version
Browse files Browse the repository at this point in the history
  • Loading branch information
gunndabad committed Nov 22, 2024
1 parent 3704790 commit 66fa0e3
Show file tree
Hide file tree
Showing 4 changed files with 186 additions and 232 deletions.
22 changes: 11 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ RUN DATABASE_PASSWORD=required-to-run-but-not-used \
bundle exec rails assets:precompile

# Cleanup to save space in the production image
RUN rm -rf node_modules log/* tmp/* /tmp && \
RUN rm -rf log/* tmp/* /tmp && \
rm -rf /usr/local/bundle/cache && \
rm -rf .env && \
find /usr/local/bundle/gems -name "*.c" -delete && \
Expand Down Expand Up @@ -86,16 +86,16 @@ RUN apk add --no-cache libpq
COPY --from=builder /app /app
COPY --from=builder /usr/local/bundle/ /usr/local/bundle/

# SSH access specific to Azure
# Install OpenSSH and set the password for root to "Docker!".
RUN apk add --no-cache openssh && echo "root:Docker!" | chpasswd

# Copy the Azure specific sshd_config file to the /etc/ssh/ directory
RUN ssh-keygen -A && mkdir -p /var/run/sshd
COPY azure/.sshd_config /etc/ssh/sshd_config

# Open port 2222 for Azure SSH access
EXPOSE 2222
# Set up puppeteer (for PDF generation)
# https://pptr.dev/troubleshooting#running-on-alpine
RUN apk add --no-cache \
chromium \
nss \
freetype \
harfbuzz \
ca-certificates \
ttf-freefont \
nodejs

CMD bundle exec rails db:migrate:ignore_concurrent_migration_exceptions && \
bundle exec rails data:migrate:ignore_concurrent_migration_exceptions && \
Expand Down
3 changes: 2 additions & 1 deletion config/initializers/grover.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
bottom: "0",
left: "0",
right: "0"
}
},
launch_args: ["--no-sandbox", "--disable-setuid-sandbox"]
}
config.use_jpeg_middleware = false
config.use_png_middleware = false
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"dependencies": {
"esbuild": "^0.24.0",
"govuk-frontend": "^5.6.0",
"sass": "^1.79.3",
"puppeteer": "22.6.1"
"puppeteer": "^23.9.0",
"sass": "^1.79.3"
},
"scripts": {
"build:css": "sass ./app/assets/stylesheets/certificates.scss:./app/assets/builds/certificates.css ./app/assets/stylesheets/check_records.scss:./app/assets/builds/check_records.css ./app/assets/stylesheets/qualifications.scss:./app/assets/builds/qualifications.css --no-source-map --load-path=node_modules --quiet-deps",
Expand Down
Loading

0 comments on commit 66fa0e3

Please sign in to comment.