From 3bf9594842bcac021ed6ae7c0ff42f62433d8fa2 Mon Sep 17 00:00:00 2001 From: Jason Jordan Date: Wed, 6 May 2026 15:07:57 -0400 Subject: [PATCH] prod pruning --- .gitignore | 4 + card_FairosRxIDCard.jrxml | 878 -------------------------------------- card_view.sql | 199 --------- dev.compose.yaml | 4 +- development.Dockerfile | 89 +--- development2.Dockerfile | 73 ---- development3.Dockerfile | 45 -- heroku.yml | 5 - render.yaml | 43 -- 9 files changed, 27 insertions(+), 1313 deletions(-) delete mode 100644 card_FairosRxIDCard.jrxml delete mode 100644 card_view.sql delete mode 100644 development2.Dockerfile delete mode 100644 development3.Dockerfile delete mode 100644 heroku.yml delete mode 100644 render.yaml diff --git a/.gitignore b/.gitignore index ebec06a..3bf3b17 100644 --- a/.gitignore +++ b/.gitignore @@ -82,3 +82,7 @@ yarn-debug.log* /employer_word_docs # Ignore application configuration /config/application.yml + +scratch.rb +start_rails.bat +web.config diff --git a/card_FairosRxIDCard.jrxml b/card_FairosRxIDCard.jrxml deleted file mode 100644 index 26dc4fa..0000000 --- a/card_FairosRxIDCard.jrxml +++ /dev/null @@ -1,878 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <band splitType="Stretch"/> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/card_view.sql b/card_view.sql deleted file mode 100644 index aa08a9c..0000000 --- a/card_view.sql +++ /dev/null @@ -1,199 +0,0 @@ -USE [VHCS_HIPAA] -GO - -/****** Object: View [dbo].[HLIDCardsViewEgg] Script Date: 12/3/2025 12:34:01 PM ******/ -SET ANSI_NULLS ON -GO - -SET QUOTED_IDENTIFIER ON -GO - - - - - - -ALTER VIEW [dbo].[HLIDCardsViewEgg] -AS - SELECT dbo.HLIDCardsEgg.Facility, - dbo.HLIDCardsEgg.Division AS Division, - UPPER(dbo.HLIDCardsEgg.FullName) AS FullName, - 'XXX-XX-' + SUBSTRING(dbo.HLIDCardsEgg.SSN, 6, 4) AS SSN, - dbo.HLIDCardsEgg.MedicalCoverage, - dbo.HLIDCardsEgg.MedicalEffDate, - dbo.HLIDCardsEgg.MedicalGroupNum, - dbo.HLIDCardsEgg.DentalCoverage, - dbo.HLIDCardsEgg.DentalEffDate, - dbo.HLIDCardsEgg.DentalGroupNum, - dbo.HLIDCardsEgg.CardType, - dbo.HLIDCardProvider.ProviderCode, - dbo.HLIDCardProvider.ProviderLine1, - dbo.HLIDCardProvider.ProviderLine2, - dbo.HLIDCardProvider.ProviderLine3, - dbo.HLIDCardProvider.ProviderLine4, - dbo.HLIDCardProvider.ProviderLine5, - dbo.HLIDCardProvider.ProviderLine6, - dbo.HLIDCardProvider.ProviderLine7, - dbo.HLIDCardProvider.ProviderLine8, - dbo.HLIDCardProvider.ProviderLine9, - dbo.HLIDCardProvider.ProviderLine10, - dbo.HLIDCardProvider.ProviderLine11, - dbo.HLIDCardProvider.MailTo, - dbo.HLIDCardProvider.MailTo2, - dbo.HLIDCardProvider.ClaimTo1, - dbo.HLIDCardProvider.ClaimTo2, - dbo.HLIDCardProvider.ClaimTo3, - dbo.HLIDCardProvider.ClaimTo4, - dbo.HLIDCardProvider.ClaimTo5, - dbo.HLIDCardProvider.ClaimTo6, - dbo.HLIDCardProvider.ClaimTo7, - dbo.HLIDCardProvider.ClaimTo8, - dbo.HLIDCardProvider.ClaimTo9, - dbo.HLIDCardProvider.ClaimTo10, - dbo.HLIDCardProvider.ClaimTo11, - dbo.HLIDCardProvider.ContactLine1, - dbo.HLIDCardProvider.ContactLine2, - dbo.HLIDCardProvider.ContactLine3, - dbo.HLIDCardsEgg.GroupNumber, - REPLACE(dbo.HLIDCardsEgg.SSN, '-', '') AS FamilyId, dbo.HLIDCardsEgg.GroupNumber AS GroupNo, - - CASE - WHEN dbo.HLIDCardsEgg.PLPlanKey = 56 -- HealthBus/TCRM BENEFITS - Plan Specific RXGroupID - THEN (Select RXGroupID From HLRXCrosRef_Product Where PLPlanKey = dbo.HLIDCardsEgg.PLPlanKey And PBProductKey = dbo.HLIDCardsEgg.PBProductKey) - ELSE dbo.HLRXCrosRef.RXGroupID - END as RXGroupID, - - dbo.HLRXCrosRef.HelpDesk, - dbo.HLRXCrosRef.CustomerService, - dbo.HLRXCrosRef.WebUrl, - dbo.HLIDCardProvider.MailTo2 AS Expr1, - - CASE - WHEN CardType = 'T' THEN '1-800-676-1182' - WHEN CardType = 'I' THEN '1-800-676-1182' - WHEN CardType = 'A' THEN '1-800-676-1182' - WHEN CardType = 'J' THEN '1-800-676-1182' - WHEN CardType = 'K' THEN '1-800-676-1182' - ELSE 'Britton Benefits at 1-800-676-1182' - END Line3, - - ISNULL((Select DependentName - From (Select distinct TOP(1) dbo.HLEggIdCardDependent.DependentName DependentName, dbo.HLEggIdCardDependent.SequenceNumber SequenceNumber - From dbo.HLEggIdCardDependent Where dbo.HLEggIdCardDependent.FamilyId = dbo.HLIDCardsEgg.SSN - order by dbo.HLEggIdCardDependent.SequenceNumber) A),'') as Dependent1, - ISNULL((Select DependentName - From (Select distinct dbo.HLEggIdCardDependent.DependentName DependentName, dbo.HLEggIdCardDependent.SequenceNumber SequenceNumber - From dbo.HLEggIdCardDependent Where dbo.HLEggIdCardDependent.FamilyId = dbo.HLIDCardsEgg.SSN - order by dbo.HLEggIdCardDependent.SequenceNumber - OFFSET 1 ROWS -- backup 1 row - FETCH NEXT 1 ROWS ONLY) A),'') as Dependent2, - ISNULL((Select DependentName - From (Select distinct dbo.HLEggIdCardDependent.DependentName DependentName, dbo.HLEggIdCardDependent.SequenceNumber SequenceNumber - From dbo.HLEggIdCardDependent Where dbo.HLEggIdCardDependent.FamilyId = dbo.HLIDCardsEgg.SSN - order by dbo.HLEggIdCardDependent.SequenceNumber - OFFSET 2 ROWS -- backup 2 rows - FETCH NEXT 1 ROWS ONLY) A),'') as Dependent3, - ISNULL((Select DependentName - From (Select distinct dbo.HLEggIdCardDependent.DependentName DependentName, dbo.HLEggIdCardDependent.SequenceNumber SequenceNumber - From dbo.HLEggIdCardDependent Where dbo.HLEggIdCardDependent.FamilyId = dbo.HLIDCardsEgg.SSN - order by dbo.HLEggIdCardDependent.SequenceNumber - OFFSET 3 ROWS -- backup 3 rows - FETCH NEXT 1 ROWS ONLY) A),'') as Dependent4, - ISNULL((Select DependentName - From (Select distinct dbo.HLEggIdCardDependent.DependentName DependentName, dbo.HLEggIdCardDependent.SequenceNumber SequenceNumber - From dbo.HLEggIdCardDependent Where dbo.HLEggIdCardDependent.FamilyId = dbo.HLIDCardsEgg.SSN - order by dbo.HLEggIdCardDependent.SequenceNumber - OFFSET 4 ROWS -- backup 4 rows - FETCH NEXT 1 ROWS ONLY) A),'') as Dependent5, - ISNULL((Select DependentName - From (Select distinct dbo.HLEggIdCardDependent.DependentName DependentName, dbo.HLEggIdCardDependent.SequenceNumber SequenceNumber - From dbo.HLEggIdCardDependent Where dbo.HLEggIdCardDependent.FamilyId = dbo.HLIDCardsEgg.SSN - order by dbo.HLEggIdCardDependent.SequenceNumber - OFFSET 5 ROWS -- backup 5 rows - FETCH NEXT 1 ROWS ONLY) A),'') as Dependent6, - ISNULL((Select DependentName - From (Select distinct dbo.HLEggIdCardDependent.DependentName DependentName, dbo.HLEggIdCardDependent.SequenceNumber SequenceNumber - From dbo.HLEggIdCardDependent Where dbo.HLEggIdCardDependent.FamilyId = dbo.HLIDCardsEgg.SSN - order by dbo.HLEggIdCardDependent.SequenceNumber - OFFSET 6 ROWS -- backup 6 rows - FETCH NEXT 1 ROWS ONLY) A),'') as Dependent7, - ISNULL((Select DependentName - From (Select distinct dbo.HLEggIdCardDependent.DependentName DependentName, dbo.HLEggIdCardDependent.SequenceNumber SequenceNumber - From dbo.HLEggIdCardDependent Where dbo.HLEggIdCardDependent.FamilyId = dbo.HLIDCardsEgg.SSN - order by dbo.HLEggIdCardDependent.SequenceNumber - OFFSET 7 ROWS -- backup 7 rows - FETCH NEXT 1 ROWS ONLY) A),'') as Dependent8, - - ISNULL((Select h.BenefitDesc From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 1), '') as BenDesc1, - ISNULL((Select h.Benefit From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 1), '') as Ben1, - ISNULL((Select h.BenefitDesc From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 2), '') as BenDesc2, - ISNULL((Select h.Benefit From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 2), '') as Ben2, - ISNULL((Select h.BenefitDesc From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 3), '') as BenDesc3, - ISNULL((Select h.Benefit From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 3), '') as Ben3, - ISNULL((Select h.BenefitDesc From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 4), '') as BenDesc4, - ISNULL((Select h.Benefit From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 4), '') as Ben4, - ISNULL((Select h.BenefitDesc From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 5), '') as BenDesc5, - ISNULL((Select h.Benefit From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 5), '') as Ben5, - ISNULL((Select h.BenefitDesc From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 6), '') as BenDesc6, - ISNULL((Select h.Benefit From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 6), '') as Ben6, - ISNULL((Select h.BenefitDesc From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 7), '') as BenDesc7, - ISNULL((Select h.Benefit From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 7), '') as Ben7, - ISNULL((Select h.BenefitDesc From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 8), '') as BenDesc8, - ISNULL((Select h.Benefit From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 8), '') as Ben8, - ISNULL((Select h.BenefitDesc From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 9), '') as BenDesc9, - ISNULL((Select h.Benefit From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 9), '') as Ben9, - ISNULL((Select h.BenefitDesc From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 10),'') as BenDesc10, - ISNULL((Select h.Benefit From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 10),'') as Ben10, - ISNULL((Select h.BenefitDesc From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 11),'') as BenDesc11, - ISNULL((Select h.Benefit From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 11),'') as Ben11, - ISNULL((Select h.BenefitDesc From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 12),'') as BenDesc12, - ISNULL((Select h.Benefit From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 12),'') as Ben12, - ISNULL((Select h.BenefitDesc From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 13),'') as BenDesc13, - ISNULL((Select h.Benefit From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 13),'') as Ben13, - ISNULL((Select h.BenefitDesc From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 14),'') as BenDesc14, - ISNULL((Select h.Benefit From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 14),'') as Ben14, - - dbo.HLIDCardsEgg.PLPlanKey, - dbo.HLIDCardsEgg.MBMemberKey, - dbo.HLIDCardProvider.ProviderLookup1, - dbo.HLIDCardProvider.ProviderLookup2, - dbo.HLIDCardProvider.Precert1, - dbo.HLIDCardProvider.Precert2, - dbo.HLIDCardProvider.Precert3, - dbo.HLIDCardProvider.Precert4, - dbo.HLIDCardProvider.Precert5, - dbo.HLIDCardProvider.Precert6, - - CASE - WHEN dbo.HLIDCardsEgg.PLPlanKey IN (13, 21, 39, 49, 50, 51, 20, 52, 19, 53, 54, 56, 58, 60, 61, 62) - THEN 'Benefits are not insured by Cigna Healthcare or affiliates' - ELSE '' - END AS MISCDATA, - - CASE WHEN dbo.HLIDCardsEgg.PLPlanKey IN (21,39) THEN 'CIGNA' ELSE '' END AS PPODATA, - CASE WHEN dbo.HLIDCardsEgg.PLPlanKey IN (21,39) THEN 'PPO' ELSE '' END AS PPODATA2, - CASE WHEN dbo.HLIDCardsEgg.PLPlanKey IN (21,39) THEN '"S"' ELSE '' END AS PPODATA3, - - CASE - WHEN LEN(FullName) - LEN(REPLACE(FullName,' ','')) > 2 - THEN FullName - WHEN LEN(FullName) - LEN(REPLACE(FullName,' ','')) > 1 - THEN SUBSTRING(SUBSTRING(FullName , CHARINDEX(' ', FullName ) + 1, LEN(FullName )), - CHARINDEX(' ', SUBSTRING(FullName , CHARINDEX(' ', FullName ) + 1, LEN(FullName )) ) + 1, - LEN(SUBSTRING(FullName , CHARINDEX(' ', FullName ) + 1, LEN(FullName )) )) - WHEN LEN(FullName) - LEN(REPLACE(FullName,' ','')) > 0 - THEN SUBSTRING(FullName , CHARINDEX(' ', FullName ) + 1, LEN(FullName )) - ELSE FullName - END AS LastName - - FROM dbo.HLIDCardsEgg - INNER JOIN dbo.HLIDCardProvider - ON dbo.HLIDCardsEgg.CardType = dbo.HLIDCardProvider.ProviderCode - INNER JOIN dbo.HLRXCrosRef - ON dbo.HLRXCrosRef.GroupNo = dbo.HLIDCardsEgg.GroupNumber - WHERE dbo.HLIDCardsEgg.PBProductKey IN (Select PBProductKey From PBProduct Where FullDescription NOT LIKE '%LIFE%' AND FullDescription NOT LIKE '%VISION%') - AND dbo.HLIDCardsEgg.PBProductKey <> 1059 -- Grace Chapel Vision - -GO - - diff --git a/dev.compose.yaml b/dev.compose.yaml index 890aab4..6a551f4 100644 --- a/dev.compose.yaml +++ b/dev.compose.yaml @@ -2,7 +2,7 @@ services: web: build: context: ./ - dockerfile: development3.Dockerfile + dockerfile: development.Dockerfile command: bash -c "rm -f tmp/pids/server.pid && bin/dev" volumes: - .:/usr/src/app @@ -45,7 +45,7 @@ services: # cron: # build: # context: ./ - # dockerfile: development3.Dockerfile + # dockerfile: development.Dockerfile # command: ./bin/cron-entrypoint # volumes: # - .:/usr/src/app diff --git a/development.Dockerfile b/development.Dockerfile index 3c35479..491b968 100644 --- a/development.Dockerfile +++ b/development.Dockerfile @@ -1,83 +1,26 @@ -# syntax = docker/dockerfile:1 +# ----- Build Stage ----- +# Using a specific Ruby version (e.g., 3.3) for stability +ARG RUBY_VERSION=3.4.8 +FROM docker.io/library/ruby:3.4.8-slim as base -# Make sure RUBY_VERSION matches the Ruby version in .ruby-version and Gemfile -ARG RUBY_VERSION=3.3.9 -FROM docker.io/library/ruby:$RUBY_VERSION-slim as base - -# OS Level Dependencies +# Install production system dependencies RUN --mount=type=cache,target=/var/cache/apt \ --mount=type=cache,target=/var/lib/apt,sharing=locked \ --mount=type=tmpfs,target=/var/log \ rm -f /etc/apt/apt.conf.d/docker-clean; \ - echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache; \ apt-get update -qq \ && apt-get install -yq --no-install-recommends \ build-essential \ - cmake \ - ruby-dev \ - gnupg2 \ less \ git \ - unixodbc \ - unixodbc-dev \ + cron \ + curl \ + dos2unix \ tdsodbc \ freetds-dev \ libvips \ libpq-dev \ - curl \ - libjemalloc2 \ - pkg-config \ - python3-dev \ - wget \ - libtool \ - libssl-dev && \ - rm -rf /var/lib/apt/lists/* - -ARG WATCHMAN_VERSION=v2025.11.10.00 -WORKDIR /tmp -RUN git clone https://github.com/facebook/watchman.git -b ${WATCHMAN_VERSION} --depth 1 && \ - cd watchman && \ - ./autogen.sh && \ - ./configure && \ - make && \ - make install - -# Download and install Watchman from the pre-compiled binary -# RUN curl -L https://github.com/facebook/watchman/archive/refs/tags/v${WATCHMAN_VERSION}.zip -o watchman.zip \ -# && unzip watchman.zip \ -# && rm watchman.zip \ -# && cd watchman-${WATCHMAN_VERSION} \ -# && mkdir -p /usr/local/{bin,lib} /usr/local/var/run/watchman \ -# && chmod 755 /usr/local/bin/watchman \ -# && chmod 2777 /usr/local/var/run/watchman \ -# && cd .. \ -# && rm -fr ${WATCHMAN_VERSION} - -# OS Level Dependencies -# RUN --mount=type=cache,target=/var/cache/apt \ -# --mount=type=cache,target=/var/lib/apt,sharing=locked \ -# --mount=type=tmpfs,target=/var/log \ -# rm -f /etc/apt/apt.conf.d/docker-clean; \ -# echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache; \ -# apt-get update -qq \ -# && apt-get install -yq --no-install-recommends \ -# build-essential \ -# ruby-dev \ -# gnupg2 \ -# less \ -# git \ -# unixodbc \ -# unixodbc-dev \ -# tdsodbc \ -# freetds-dev \ -# libvips \ -# libpq-dev \ -# curl \ -# libjemalloc2 \ -# pkg-config \ -# libtool \ -# libssl-dev && \ -# rm -rf /var/lib/apt/lists/* + libyaml-dev ENV LANG=C.UTF-8 \ BUNDLE_JOBS=4 \ @@ -85,8 +28,18 @@ ENV LANG=C.UTF-8 \ WORKDIR /usr/src/app -ENTRYPOINT ["./bin/docker-entrypoint-development"] +RUN gem install foreman +# COPY bin/development-entrypoint.sh /bin/development-entrypoint.sh +# RUN chown root:root bin/development-entrypoint.sh && chmod +x bin/development-entrypoint.sh + +ENTRYPOINT ["./bin/development-entrypoint"] + +# ENTRYPOINT ["./bin/cron-entrypoint"] + + +# Expose the application port EXPOSE 3002 -CMD ["./bin/rails", "server"] +# Set the default command to run the Rails server +CMD ["./bin/dev"] diff --git a/development2.Dockerfile b/development2.Dockerfile deleted file mode 100644 index 8f3ea7e..0000000 --- a/development2.Dockerfile +++ /dev/null @@ -1,73 +0,0 @@ -# ----- Build Stage ----- -# Using a specific Ruby version (e.g., 3.3) for stability -ARG RUBY_VERSION=3.3.9 -FROM ruby:$RUBY_VERSION as builder - -# Install system dependencies needed for Ruby gems and asset building -RUN apt-get update -qq && apt-get install -y \ - build-essential \ - libpq-dev \ - libvips \ - nodejs \ - npm \ - git \ - curl \ - watchman \ - && rm -rf /var/lib/apt/lists/* \ - # For TailwindCSS, install the npm package instead of relying on the system executable - # as there have been issues with architecture mismatches in containers - && npm install -g tailwindcss - -# Set the working directory inside the container -WORKDIR /usr/src/app - -# Copy and install Ruby dependencies -COPY Gemfile Gemfile.lock ./ -RUN bundle install - -# Copy the rest of the application code -COPY . . - -# Precompile assets for production using the installed Tailwind CLI -# This uses the installed 'tailwindcss' executable rather than the gem's wrapper -# RUN bundle exec rails assets:precompile - -# ----- Production Stage ----- -# Use a smaller Ruby image for the final production build -FROM ruby:$RUBY_VERSION-slim - -# Install production system dependencies -RUN --mount=type=cache,target=/var/cache/apt \ - --mount=type=cache,target=/var/lib/apt,sharing=locked \ - --mount=type=tmpfs,target=/var/log \ - rm -f /etc/apt/apt.conf.d/docker-clean; \ - apt-get update -qq \ - && apt-get install -yq --no-install-recommends \ - build-essential \ - less \ - git \ - tdsodbc \ - freetds-dev \ - libvips \ - libpq-dev - -ENV LANG=C.UTF-8 \ - BUNDLE_JOBS=4 \ - BUNDLE_RETRY=3 - -WORKDIR /usr/src/app - -# Copy runtime Ruby dependencies and the precompiled assets from the builder stage -COPY --from=builder /usr/local/bundle /usr/local/bundle -COPY --from=builder /usr/src/app /usr/src/app -COPY --from=builder /usr/local/bin/watchman /usr/local/bin/watchman -COPY --from=builder /usr/local/bin/watchman-wait /usr/local/bin/watchman-wai - -# The entrypoint script is a good practice for handling Rails server startup -ENTRYPOINT ["./bin/docker-entrypoint-development"] - -# Expose the application port -EXPOSE 3002 - -# Set the default command to run the Rails server -CMD ["./bin/rails", "server"] diff --git a/development3.Dockerfile b/development3.Dockerfile deleted file mode 100644 index 491b968..0000000 --- a/development3.Dockerfile +++ /dev/null @@ -1,45 +0,0 @@ -# ----- Build Stage ----- -# Using a specific Ruby version (e.g., 3.3) for stability -ARG RUBY_VERSION=3.4.8 -FROM docker.io/library/ruby:3.4.8-slim as base - -# Install production system dependencies -RUN --mount=type=cache,target=/var/cache/apt \ - --mount=type=cache,target=/var/lib/apt,sharing=locked \ - --mount=type=tmpfs,target=/var/log \ - rm -f /etc/apt/apt.conf.d/docker-clean; \ - apt-get update -qq \ - && apt-get install -yq --no-install-recommends \ - build-essential \ - less \ - git \ - cron \ - curl \ - dos2unix \ - tdsodbc \ - freetds-dev \ - libvips \ - libpq-dev \ - libyaml-dev - -ENV LANG=C.UTF-8 \ - BUNDLE_JOBS=4 \ - BUNDLE_RETRY=3 - -WORKDIR /usr/src/app - -RUN gem install foreman - -# COPY bin/development-entrypoint.sh /bin/development-entrypoint.sh -# RUN chown root:root bin/development-entrypoint.sh && chmod +x bin/development-entrypoint.sh - -ENTRYPOINT ["./bin/development-entrypoint"] - -# ENTRYPOINT ["./bin/cron-entrypoint"] - - -# Expose the application port -EXPOSE 3002 - -# Set the default command to run the Rails server -CMD ["./bin/dev"] diff --git a/heroku.yml b/heroku.yml deleted file mode 100644 index c4de7d5..0000000 --- a/heroku.yml +++ /dev/null @@ -1,5 +0,0 @@ -build: - docker: - web: Dockerfile -run: - web: bundle exec puma -C config/puma.rb diff --git a/render.yaml b/render.yaml deleted file mode 100644 index 892c6ca..0000000 --- a/render.yaml +++ /dev/null @@ -1,43 +0,0 @@ -databases: - - name: mysite - databaseName: mysite - user: mysite - plan: free - -services: - - type: web - name: mysite - runtime: docker - dockerfilePath: ./Dockerfile - repo: https://github.com/ryanwi/rails7-on-docker - region: oregon - branch: main - plan: free - numInstances: 1 - healthCheckPath: /up - preDeployCommand: bin/rails db:migrate - envVars: - - key: PORT - value: 3000 - - key: DATABASE_URL - fromDatabase: - name: mysite - property: connectionString - - key: SECRET_KEY_BASE - sync: false # placeholder for a value to be added in the dashboard - - key: REDIS_HOST - fromService: - type: redis - name: lightning - property: host # available properties are listed below - - key: REDIS_PORT - fromService: - type: redis - name: lightning - property: port - - type: redis - name: lightning - ipAllowList: # required - - source: 0.0.0.0/0 - description: everywhere - plan: free