Skip to content

Commit

Permalink
rails 7 deploy to qa
Browse files Browse the repository at this point in the history
  • Loading branch information
Deepika Gonuguntla committed Mar 1, 2024
1 parent f5bb80c commit 32dffbf
Show file tree
Hide file tree
Showing 138 changed files with 9,188 additions and 37,116 deletions.
14 changes: 0 additions & 14 deletions .env-cmdrc

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,6 @@
yarn-debug.log*
.yarn-integrity


/app/assets/builds/*
!/app/assets/builds/.keep
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ services:

branches:
only:
- qa
- MLN-rails7-feb22
- production

jobs:
include:
- stage: docker build
if: (branch = qa or branch = production)
if: (branch = MLN-rails7-feb22 or branch = production)
before_install:
- if [[ $TRAVIS_BRANCH == "qa" ]];
- if [[ $TRAVIS_BRANCH == "MLN-rails7-feb22" ]];
then
export AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID_QA};
export AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY_QA};
Expand Down Expand Up @@ -43,8 +43,8 @@ jobs:
aws ecr put-image --repository-name my-library-nyc-app --image-tag "$ENV-previous" --image-manifest "$MANIFEST"
- docker push "$ECR_URL:$LOCAL_TAG_NAME"

- stage: deploy qa
if: branch IN (qa) AND type != pull_request
- stage: deploy MLN-rails7-feb22
if: branch IN (MLN-rails7-feb22) #AND type != pull_request
env:
- AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID_QA
- AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY_QA
Expand Down
34 changes: 19 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ RUN apt-get update -qq \
postgresql-client \
git

RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - \
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash - \
&& apt-get -y install nodejs \
&& npm install --global yarn
&& yarn install --global yarn

# set up app files
COPY . $APP_HOME
Expand All @@ -34,19 +34,23 @@ RUN bundle config --global github.https true \
&& bundle install --jobs 30

# mount AWS creds in a single layer
RUN --mount=type=secret,id=AWS_ACCESS_KEY_ID \
--mount=type=secret,id=AWS_SECRET_ACCESS_KEY \
AWS_ACCESS_KEY_ID=$(cat /run/secrets/AWS_ACCESS_KEY_ID) \
&& export AWS_ACCESS_KEY_ID \
AWS_SECRET_ACCESS_KEY=$(cat /run/secrets/AWS_SECRET_ACCESS_KEY) \
&& export AWS_SECRET_ACCESS_KEY \
&& bundle exec rails webpacker:install \
&& bundle exec rails webpacker:compile
# RUN --mount=type=secret,id=AWS_ACCESS_KEY_ID \
# --mount=type=secret,id=AWS_SECRET_ACCESS_KEY \
# AWS_ACCESS_KEY_ID=$(cat /run/secrets/AWS_ACCESS_KEY_ID) \
# && export AWS_ACCESS_KEY_ID \
# AWS_SECRET_ACCESS_KEY=$(cat /run/secrets/AWS_SECRET_ACCESS_KEY) \
# && export AWS_SECRET_ACCESS_KEY \
# && bundle exec rails webpacker:install \
# && bundle exec rails webpacker:compile

# webpack overwrites these files
COPY config/webpacker.yml $APP_HOME/config/
COPY config/webpack/environment.js $APP_HOME/config/webpack/
COPY babel.config.js $APP_HOME

# COPY config/webpacker.yml $APP_HOME/config/
# COPY config/webpack/environment.js $APP_HOME/config/webpack/
# COPY babel.config.js $APP_HOME

# build
RUN yarn build
RUN yarn build:css
RUN bin/rails assets:precompile
EXPOSE 3000
CMD ["bundle", "exec", "rails", "server", "-p", "3000", "-b", "0.0.0.0"]
CMD ["bundle", "exec", "rails", "server", "-p", "3000", "-b", "0.0.0.0"]
38 changes: 23 additions & 15 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,32 +15,32 @@ gem 'delayed_job_active_record'
gem 'daemons'

gem "minitest-stub_any_instance"
gem 'rails', '6.1.4.1'
gem 'actionpack', '6.1.4.1'
gem 'actioncable', '6.1.4.1'
gem 'rails', '7.0.2.2'
gem 'actionpack', '7.0.2.2'
gem 'actioncable', '7.0.2.2'
gem 'activeadmin', '~> 2.14'
gem 'actionmailer', '6.1.4.1'
gem 'actionmailer', '7.0.2.2'
gem 'activeadmin_reorderable'
gem 'activemodel', '6.1.4.1'
gem 'activejob', '6.1.4.1'
gem 'activerecord', '6.1.4.1'
gem 'activestorage', '6.1.4.1'
gem 'activesupport', '6.1.4.1'
gem 'activemodel', '7.0.2.2'
gem 'activejob', '7.0.2.2'
gem 'activerecord', '7.0.2.2'
gem 'activestorage', '7.0.2.2'
gem 'activesupport', '7.0.2.2'
gem 'active_model_serializers', '~> 0.8.1'
gem 'acts_as_list'
gem 'addressable'
gem 'auto-session-timeout'
gem 'actionview', '6.1.4.1'
gem 'actionview', '7.0.2.2'
gem 'aws-sdk', '~> 3'
gem 'client_side_validations', '17.2.0'
gem 'client_side_validations', '22.1.1'
gem 'cranky'
gem 'devise', '4.8.1'
gem 'elasticsearch', '6.8'
gem 'email_validator'
gem 'faker'
gem 'figaro'
gem 'font-awesome-rails'
gem 'railties', '~> 6.1.4.1'
gem 'railties', '~> 7.0.2.2'
gem 'google-api-client'
gem 'google_drive'
gem 'httparty'
Expand All @@ -62,11 +62,11 @@ gem 'yaml_db'
gem 'rexml', '~> 3.2.5'
gem 'rubocop-performance', '~> 1.16'
gem 'thread_safe', '~> 0.3.6'
gem "react_on_rails", "12.0.0"
gem "webpacker", "~> 5"
gem "react_on_rails", "13.4"
gem "breakpoint", "~>2.4.0"
gem 'execjs'
gem 'therubyracer', :platforms => :ruby
#gem 'therubyracer', :platforms => :ruby
gem 'mini_racer'
gem 'bcrypt'
gem 'puma', '~> 5.5'
gem 'activeadmin_addons', '~> 1.9'
Expand All @@ -75,6 +75,14 @@ gem 'rack', '~> 2.2.4'
gem 'jsonapi-serializer'
gem 'auto_increment', '~> 1.5', '>= 1.5.2'
gem 'luhn'
gem 'sprockets-rails'
gem "turbo-rails"
gem "stimulus-rails"
gem "jsbundling-rails"
gem "cssbundling-rails"
gem "jquery-rails", "~> 4.2"
gem "importmap-rails"
gem 'dotenv-rails'

group :assets do # Gems used only for assets and not required in production environments by default.
gem 'sass-rails'
Expand Down
Loading

0 comments on commit 32dffbf

Please sign in to comment.