From ff573fe11bea6af994247f0075f4ecc4f8dd70c7 Mon Sep 17 00:00:00 2001 From: Seow Alex Date: Mon, 10 Jan 2022 11:36:10 +0000 Subject: [PATCH 1/2] Add deployment instructions --- Gemfile | 1 + Gemfile.lock | 9 ++++++++- README.md | 25 +++++++++++++++++++++++++ app/views/layouts/application.html.erb | 3 --- 4 files changed, 34 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index f750fc2..f19659d 100644 --- a/Gemfile +++ b/Gemfile @@ -5,6 +5,7 @@ ruby '2.6.5' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '~> 6.0.1' +gem 'mimemagic', github: 'mimemagicrb/mimemagic', ref: 'd5ebc0cd846dcc68142622c76ad71d021768b7c2' # Use postgresql as the database for Active Record gem 'pg', '>= 0.18', '< 2.0' # Use Puma as the app server diff --git a/Gemfile.lock b/Gemfile.lock index e3e8654..f0ef03e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,3 +1,10 @@ +GIT + remote: https://github.com/mimemagicrb/mimemagic.git + revision: d5ebc0cd846dcc68142622c76ad71d021768b7c2 + ref: d5ebc0cd846dcc68142622c76ad71d021768b7c2 + specs: + mimemagic (0.3.3) + GEM remote: https://rubygems.org/ specs: @@ -131,7 +138,6 @@ GEM marcel (0.3.3) mimemagic (~> 0.3.2) method_source (0.9.2) - mimemagic (0.3.3) mini_mime (1.0.2) mini_portile2 (2.4.0) minitest (5.13.0) @@ -262,6 +268,7 @@ DEPENDENCIES jbuilder (~> 2.7) jsonapi-resources listen (>= 3.0.5, < 3.2) + mimemagic! pg (>= 0.18, < 2.0) puma (~> 4.1) rails (~> 6.0.1) diff --git a/README.md b/README.md index ad14af2..2102622 100644 --- a/README.md +++ b/README.md @@ -37,3 +37,28 @@ bundle exec rails s bin/webpack-dev-server yarn watch-typings ``` + +### Deploy +*Note: Ensure that `RAILS_ENV=production` is set for all of the following commands.* +1. Install dependencies +``` +bundle install +yarn install +``` +2. Generate Rails credentials +``` +bundle exec rails credentials:edit +``` +3. Setup database +``` +bundle exec rails db:create +bundle exec rails db:migrate +``` +4. Precompile assets +``` +bundle exec assets:precompile +``` +5. Run application +``` +bundle exec rails s +``` diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index efa4307..94e200e 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -9,9 +9,6 @@ <%= javascript_pack_tag 'application' %> <%= javascript_pack_tag 'index' %> - - <%= stylesheet_pack_tag 'application' %> - <%= stylesheet_pack_tag 'index' %> From c48f11219feb8c8c12333ef7dd89a3871fce6699 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Jan 2022 11:39:26 +0000 Subject: [PATCH 2/2] Bump axios from 0.19.0 to 0.21.2 Bumps [axios](https://github.com/axios/axios) from 0.19.0 to 0.21.2. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/master/CHANGELOG.md) - [Commits](https://github.com/axios/axios/compare/v0.19.0...v0.21.2) --- updated-dependencies: - dependency-name: axios dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 42 ++++++++++-------------------------------- 2 files changed, 11 insertions(+), 33 deletions(-) diff --git a/package.json b/package.json index 4a1613d..e2934ad 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "@types/react-select": "^3.0.8", "@types/react-textarea-autosize": "^4.3.5", "array-move": "^2.2.1", - "axios": "^0.19.0", + "axios": "^0.21.2", "babel-plugin-transform-react-remove-prop-types": "^0.4.24", "bootstrap": "^4.4.1", "directory-named-webpack-plugin": "^4.0.1", diff --git a/yarn.lock b/yarn.lock index e7fa903..d8236f5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1589,13 +1589,12 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.9.0.tgz#24390e6ad61386b0a747265754d2a17219de862c" integrity sha512-Uvq6hVe90D0B2WEnUqtdgY1bATGz3mw33nH9Y+dmA+w5DHvUmBgkr5rM/KCHpCsiFNRUfokW/szpPPgMK2hm4A== -axios@^0.19.0: - version "0.19.0" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.19.0.tgz#8e09bff3d9122e133f7b8101c8fbdd00ed3d2ab8" - integrity sha512-1uvKqKQta3KBxIz14F2v06AEHZ/dIoeKfbTRkK1E5oqjDnuEerLmYTgJB5AiQZHJcljpg1TuRzdjDR06qNk0DQ== +axios@^0.21.2: + version "0.21.2" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.2.tgz#21297d5084b2aeeb422f5d38e7be4fbb82239017" + integrity sha512-87otirqUw3e8CzHTMO+/9kh/FSgXt/eVDvipijwDtEuwbkySWZ9SBm6VEubmJ/kLKEoLQV/POhxXFb66bfekfg== dependencies: - follow-redirects "1.5.10" - is-buffer "^2.0.2" + follow-redirects "^1.14.0" axobject-query@^2.0.2: version "2.1.1" @@ -2764,14 +2763,7 @@ debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.9: dependencies: ms "2.0.0" -debug@=3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" - integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== - dependencies: - ms "2.0.0" - -debug@^3.0.0, debug@^3.1.1, debug@^3.2.5: +debug@^3.1.1, debug@^3.2.5: version "3.2.6" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== @@ -3726,19 +3718,10 @@ flush-write-stream@^1.0.0: inherits "^2.0.3" readable-stream "^2.3.6" -follow-redirects@1.5.10: - version "1.5.10" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.5.10.tgz#7b7a9f9aea2fdff36786a94ff643ed07f4ff5e2a" - integrity sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ== - dependencies: - debug "=3.1.0" - -follow-redirects@^1.0.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.9.0.tgz#8d5bcdc65b7108fe1508649c79c12d732dcedb4f" - integrity sha512-CRcPzsSIbXyVDl0QI01muNDu69S8trU4jArW9LpOt2WtC6LyUJetcIrmfHsRBx7/Jb6GHJUiuqyYxPooFfNt6A== - dependencies: - debug "^3.0.0" +follow-redirects@^1.0.0, follow-redirects@^1.14.0: + version "1.14.6" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.6.tgz#8cfb281bbc035b3c067d6cd975b0f6ade6e855cd" + integrity sha512-fhUl5EwSJbbl8AR+uYL2KQDxLkdSjZGR36xy46AO7cOMTrCMON6Sa28FmAnC2tRTDbd/Uuzz3aJBv7EBN7JH8A== for-in@^1.0.2: version "1.0.2" @@ -4512,11 +4495,6 @@ is-buffer@^1.1.5: resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== -is-buffer@^2.0.2: - version "2.0.4" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.4.tgz#3e572f23c8411a5cfd9557c849e3665e0b290623" - integrity sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A== - is-callable@^1.1.4, is-callable@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.5.tgz#f7e46b596890456db74e7f6e976cb3273d06faab"