Skip to content

Commit

Permalink
Resolving conflicts with main
Browse files Browse the repository at this point in the history
  • Loading branch information
kigster committed Apr 13, 2024
2 parents 4fc5f05 + aab3078 commit 42a9007
Show file tree
Hide file tree
Showing 8 changed files with 871 additions and 6 deletions.
23 changes: 21 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ WORKDIR /rails

# Install base packages
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y curl libjemalloc2 libvips postgresql-client
apt-get install --no-install-recommends -y \
curl \
libjemalloc2 \
libvips \
postgresql-client

# Set production environment
ENV RAILS_ENV="production" \
Expand All @@ -21,7 +25,22 @@ ENV RAILS_ENV="production" \
FROM base as build

# Install packages needed to build gems and node modules
RUN apt-get install --no-install-recommends -y build-essential git libpq-dev node-gyp pkg-config python-is-python3
RUN apt-get install --no-install-recommends -y \
build-essential \
git \
libpq-dev \
node-gyp \
pkg-config \
python-is-python3

RUN set -eus; \
apt-get install -y --no-install-recommends \
shared-mime-info \
libpq-dev \
net-tools \
netcat \
htop \
strace

# Install JavaScript dependencies
ARG NODE_VERSION=20.12.1
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ GEM
tzinfo (~> 2.0)
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
airbrussh (1.5.1)
airbrussh (1.5.2)
sshkit (>= 1.6.1, != 1.7.0)
annotate (3.2.0)
activerecord (>= 3.2, < 8.0)
Expand Down Expand Up @@ -310,7 +310,7 @@ GEM
psych (>= 4.0.0)
redis (5.1.0)
redis-client (>= 0.17.0)
redis-client (0.21.1)
redis-client (0.22.0)
connection_pool
regexp_parser (2.9.0)
relaxed-rubocop (2.5)
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ docker-image: ## Builds a docker image named 'tickets'
docker build -t tickets .

shellcheck: ## Run shellcheck on the shell files
$(CURRENT_DIR)/bin/shchk
$(CURRENT_DIR)/bin/shchk

dev-install: ## Optional install of VIM configuration and other dev tools
$(CURRENT_DIR)/development/dev-install
Expand All @@ -89,7 +89,7 @@ assets: ## Build JS & CSS assets
dev: development assets ## Start the development environment
@bash -c "source $(MAKE_ENV); bundle exec foreman start -f Procfile.dev"


ci: ## Run all tests and linters as if on CI
bin/rails db:migrate
bin/rails db:test:prepare
Expand Down
2 changes: 2 additions & 0 deletions bin/boot-up
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,5 @@ h1 "Starting Rails Server..."
run.set-next show-output-on
run "sleep 5 && open http://0.0.0.0:3000/" 2>/dev/null 1>&2 &
run "bin/rails server"


11 changes: 11 additions & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,16 @@ class Application < Rails::Application

# Don't generate system test files.
config.generators.system_tests = nil

# Configure sensitive parameters which will be filtered from the log file.
config.filter_parameters += [:password]

# Enable escaping HTML in JSON.
config.active_support.escape_html_entities_in_json = true

# Use SQL instead of Active Record's schema dumper when creating the database.
# This is necessary if your schema can't be completely dumped by the schema dumper,
# like if you have constraints or database-specific column types
config.active_record.schema_format = :sql
end
end
15 changes: 15 additions & 0 deletions config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@
# While tests run files are not watched, reloading is not necessary.
config.enable_reloading = false

# Prepend all log lines with the following tags
config.log_tags = [->(_req) { DateTime.now }, :uuid]

# For Kubernetes: Log to STDOUT
config.logger = Logger.new(File.expand_path('log/test.log', Rails.root))
config.logger.level = Logger::DEBUG

# Eager loading loads your entire application. When running a single test locally,
# this is usually not necessary, and can slow down your test suite. However, it's
# recommended that you enable it in continuous integration systems to ensure eager
Expand All @@ -27,6 +34,11 @@
config.action_controller.perform_caching = false
config.cache_store = :null_store

config.active_support.deprecation = :stderr

# Raise exception on mass assignment protection for Active Record models
config.active_record.mass_assignment_sanitizer = :strict

# Render exception templates for rescuable exceptions and raise for other exceptions.
config.action_dispatch.show_exceptions = :rescuable

Expand All @@ -42,6 +54,9 @@
# The :test delivery method accumulates sent emails in the
# ActionMailer::Base.deliveries array.
config.action_mailer.delivery_method = :test
config.action_mailer.perform_deliveries = false
config.action_mailer.raise_delivery_errors = false
config.action_mailer.default_url_options = { host: 'fnf.events' }

# Unlike controllers, the mailer instance doesn't have any context about the
# incoming request so you'll need to provide the :host parameter yourself.
Expand Down
Loading

0 comments on commit 42a9007

Please sign in to comment.