From 662c128e326123e0b50bab1d8f41d7ece3ab6664 Mon Sep 17 00:00:00 2001 From: Sebastian Silva Date: Tue, 28 Dec 2021 10:02:34 -0500 Subject: [PATCH 01/11] initial changes to implement fog cloud storage library --- Gemfile | 2 ++ config/initializers/paperclip_string.rb | 11 +++++++++++ docker-compose.yml | 5 +++++ 3 files changed, 18 insertions(+) diff --git a/Gemfile b/Gemfile index f2e3b45e..e9ce24fd 100644 --- a/Gemfile +++ b/Gemfile @@ -53,6 +53,8 @@ gem 'tzinfo', '~> 1.2' gem 'open_id_authentication' gem 'protected_attributes_continued', '~> 1.8.2' gem 'ruby-openid' +gem 'fog-google' +gem 'fog-local' gem 'rack-offline', '>= 0.6.4' diff --git a/config/initializers/paperclip_string.rb b/config/initializers/paperclip_string.rb index 69a620d0..b6edce9d 100644 --- a/config/initializers/paperclip_string.rb +++ b/config/initializers/paperclip_string.rb @@ -4,6 +4,17 @@ # Paperclip.options[:command_path] = "/usr/bin/identify" # Paperclip.options[:command_path] = "/usr/local/bin" +Paperclip::Attachment.default_options[:storage] = :fog +Paperclip::Attachment.default_options[:fog_directory] = ENV["GOOGLE_STORAGE_BUCKET_NAME"] || '' +Paperclip::Attachment.default_options[:path] = ":rails_root/public/system/public/system/:class/:attachment/:id_partition/:style/:filename" +Paperclip::Attachment.default_options[:fog_credentials] = { + provider: ENV["FOG_PROVIDER"] || "Local", + local_root: "#{Rails.root}/public", + google_project: 'public-lab' , + google_json_key_location: ENV["GOOGLE_JSON_KEY_FILE"] || '' +} +Paperclip::Attachment.default_options[:fog_host] = "" + # Thank you to http://bendangelo.me/?p=60 module Paperclip # converts a string into a file for paperclip to save diff --git a/docker-compose.yml b/docker-compose.yml index 081e27b7..a4478340 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,6 +18,11 @@ services: environment: - PORT=${PORT} - POOL_SIZE=${POOL_SIZE} + - GOOGLE_STORAGE_SECRET=${GOOGLE_STORAGE_SECRET} + - GOOGLE_STORAGE_KEY=${GOOGLE_STORAGE_KEY} + - GOOGLE_STORAGE_BUCKET_NAME=${GOOGLE_STORAGE_BUCKET_NAME} + - GOOGLE_JSON_KEY_FILE=${GOOGLE_JSON_KEY_FILE} + - FOG_PROVIDER=${FOG_PROVIDER} ports: - 127.0.0.1:${PORT:-5000}:${PORT:-5000} depends_on: From 017b94b3f1dd5e8302cbfc47292aed5ee666a807 Mon Sep 17 00:00:00 2001 From: jywarren Date: Tue, 4 Jan 2022 19:03:31 +0000 Subject: [PATCH 02/11] gemfile lock --- Gemfile.lock | 105 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) diff --git a/Gemfile.lock b/Gemfile.lock index 11ded4f3..5a25ae1a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -62,16 +62,100 @@ GEM climate_control (0.2.0) concurrent-ruby (1.1.9) crass (1.0.6) + declarative (0.0.20) docile (1.4.0) erubi (1.10.0) + excon (0.90.0) execjs (2.7.0) faker (2.19.0) i18n (>= 1.6, < 2) + faraday (1.9.3) + faraday-em_http (~> 1.0) + faraday-em_synchrony (~> 1.0) + faraday-excon (~> 1.1) + faraday-httpclient (~> 1.0) + faraday-multipart (~> 1.0) + faraday-net_http (~> 1.0) + faraday-net_http_persistent (~> 1.0) + faraday-patron (~> 1.0) + faraday-rack (~> 1.0) + faraday-retry (~> 1.0) + ruby2_keywords (>= 0.0.4) + faraday-em_http (1.0.0) + faraday-em_synchrony (1.0.0) + faraday-excon (1.1.0) + faraday-httpclient (1.0.1) + faraday-multipart (1.0.3) + multipart-post (>= 1.2, < 3) + faraday-net_http (1.0.1) + faraday-net_http_persistent (1.2.0) + faraday-patron (1.0.0) + faraday-rack (1.0.0) + faraday-retry (1.0.3) ffi (1.15.5) + fog-core (2.1.0) + builder + excon (~> 0.58) + formatador (~> 0.2) + mime-types + fog-google (1.17.0) + fog-core (<= 2.1.0) + fog-json (~> 1.2) + fog-xml (~> 0.1.0) + google-apis-compute_v1 (~> 0.14) + google-apis-dns_v1 (~> 0.12) + google-apis-iamcredentials_v1 (~> 0.6) + google-apis-monitoring_v3 (~> 0.12) + google-apis-pubsub_v1 (~> 0.7) + google-apis-sqladmin_v1beta4 (~> 0.13) + google-apis-storage_v1 (~> 0.6) + google-cloud-env (~> 1.2) + fog-json (1.2.0) + fog-core + multi_json (~> 1.10) + fog-local (0.8.0) + fog-core (>= 1.27, < 3.0) + fog-xml (0.1.4) + fog-core + nokogiri (>= 1.5.11, < 2.0.0) font-awesome-rails (4.7.0.8) railties (>= 3.2, < 8.0) + formatador (0.3.0) globalid (0.4.2) activesupport (>= 4.2.0) + google-apis-compute_v1 (0.23.0) + google-apis-core (>= 0.4, < 2.a) + google-apis-core (0.4.2) + addressable (~> 2.5, >= 2.5.1) + googleauth (>= 0.16.2, < 2.a) + httpclient (>= 2.8.1, < 3.a) + mini_mime (~> 1.0) + representable (~> 3.0) + retriable (>= 2.0, < 4.a) + rexml + webrick + google-apis-dns_v1 (0.18.0) + google-apis-core (>= 0.4, < 2.a) + google-apis-iamcredentials_v1 (0.10.0) + google-apis-core (>= 0.4, < 2.a) + google-apis-monitoring_v3 (0.20.0) + google-apis-core (>= 0.4, < 2.a) + google-apis-pubsub_v1 (0.12.0) + google-apis-core (>= 0.4, < 2.a) + google-apis-sqladmin_v1beta4 (0.22.0) + google-apis-core (>= 0.4, < 2.a) + google-apis-storage_v1 (0.11.0) + google-apis-core (>= 0.4, < 2.a) + google-cloud-env (1.5.0) + faraday (>= 0.17.3, < 2.0) + googleauth (1.1.0) + faraday (>= 0.17.3, < 2.0) + jwt (>= 1.4, < 3.0) + memoist (~> 0.16) + multi_json (~> 1.11) + os (>= 0.9, < 2.0) + signet (>= 0.16, < 2.a) + httpclient (2.8.3) i18n (1.8.11) concurrent-ruby (~> 1.0) jquery-rails (4.4.0) @@ -79,6 +163,7 @@ GEM railties (>= 4.2.0) thor (>= 0.14, < 2.0) json (2.5.1) + jwt (2.3.0) libv8 (3.16.14.19) listen (3.7.1) rb-fsevent (~> 0.10, >= 0.10.3) @@ -91,6 +176,7 @@ GEM marcel (0.3.3) mimemagic (~> 0.3.2) matrix (0.4.2) + memoist (0.16.2) method_source (1.0.0) mime-types (3.4.1) mime-types-data (~> 3.2015) @@ -102,6 +188,8 @@ GEM mini_portile2 (2.6.1) minitest (5.15.0) msgpack (1.4.2) + multi_json (1.15.0) + multipart-post (2.1.1) mysql2 (0.5.3) nio4r (2.5.8) nokogiri (1.12.5) @@ -109,6 +197,7 @@ GEM racc (~> 1.4) open_id_authentication (1.3.0) rack-openid (~> 1.3) + os (1.1.4) paperclip (6.1.0) activemodel (>= 4.2.0) activesupport (>= 4.2.0) @@ -176,9 +265,14 @@ GEM redcarpet (3.5.1) ref (2.0.0) regexp_parser (2.2.0) + representable (3.1.1) + declarative (< 0.1.0) + trailblazer-option (>= 0.1.1, < 0.2.0) + uber (< 0.2.0) responders (3.0.1) actionpack (>= 5.0) railties (>= 5.0) + retriable (3.1.2) rexml (3.2.5) rmagick (4.2.4) rubocop (1.25.0) @@ -197,10 +291,16 @@ GEM rubocop-ast (>= 0.4.0) ruby-openid (2.9.2) ruby-progressbar (1.11.0) + ruby2_keywords (0.0.5) rubyzip (2.3.2) selenium-webdriver (3.142.7) childprocess (>= 0.5, < 4.0) rubyzip (>= 1.2.2) + signet (0.16.0) + addressable (~> 2.8) + faraday (>= 0.17.3, < 2.0) + jwt (>= 1.5, < 3.0) + multi_json (~> 1.10) simplecov (0.21.2) docile (~> 1.1) simplecov-html (~> 0.11) @@ -223,11 +323,14 @@ GEM ref thor (1.1.0) thread_safe (0.3.6) + trailblazer-option (0.1.2) tzinfo (1.2.9) thread_safe (~> 0.1) + uber (0.1.0) uglifier (4.2.0) execjs (>= 0.3.0, < 3) unicode-display_width (2.1.0) + webrick (1.7.0) websocket-driver (0.7.3) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) @@ -244,6 +347,8 @@ DEPENDENCIES bootsnap (~> 1.10.1) capybara faker (~> 2.19.0) + fog-google + fog-local font-awesome-rails jquery-rails listen (~> 3.7.1) From 430808f09123c7b4c49c9c8801760534e95a3d64 Mon Sep 17 00:00:00 2001 From: Jeffrey Warren Date: Tue, 4 Jan 2022 14:05:38 -0500 Subject: [PATCH 03/11] Update config/initializers/paperclip_string.rb --- config/initializers/paperclip_string.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/initializers/paperclip_string.rb b/config/initializers/paperclip_string.rb index b6edce9d..cbe60a07 100644 --- a/config/initializers/paperclip_string.rb +++ b/config/initializers/paperclip_string.rb @@ -6,7 +6,7 @@ Paperclip::Attachment.default_options[:storage] = :fog Paperclip::Attachment.default_options[:fog_directory] = ENV["GOOGLE_STORAGE_BUCKET_NAME"] || '' -Paperclip::Attachment.default_options[:path] = ":rails_root/public/system/public/system/:class/:attachment/:id_partition/:style/:filename" +Paperclip::Attachment.default_options[:path] = ":rails_root/public/system/:attachment/:id/:style/:filename" Paperclip::Attachment.default_options[:fog_credentials] = { provider: ENV["FOG_PROVIDER"] || "Local", local_root: "#{Rails.root}/public", From 74bb5729bceabbc239994572fdf5e7d19b379cce Mon Sep 17 00:00:00 2001 From: Jeffrey Warren Date: Tue, 25 Jan 2022 17:11:00 -0500 Subject: [PATCH 04/11] photo.copy_to_local_file(:original) before local ImageMagick - https://github.com/thoughtbot/paperclip/pull/2028 --- app/assets/javascripts/analyze.js | 7 ------- app/controllers/spectrums_controller.rb | 15 --------------- app/models/spectrum.rb | 19 ++++++++++++++----- config/routes.rb | 1 - 4 files changed, 14 insertions(+), 28 deletions(-) diff --git a/app/assets/javascripts/analyze.js b/app/assets/javascripts/analyze.js index 97051e47..0604cdb3 100644 --- a/app/assets/javascripts/analyze.js +++ b/app/assets/javascripts/analyze.js @@ -290,13 +290,6 @@ $W = { f.submit(); }, - set_sample_row: function() { - var rownum = prompt('Enter the percentage from the top edge from which you would like to extract a spectrum.','100') - $("#imagelink")[0].onclick = "" - $('#imagelink').tooltip('destroy') - if (rownum) window.location = '/spectrums/setsamplerow/'+$W.spectrum_id+'?row='+rownum/100.00 - }, - click_to_set_sample_row: function() { $("#imagelink")[0].onclick = "" $('#imagelink').tooltip('destroy') diff --git a/app/controllers/spectrums_controller.rb b/app/controllers/spectrums_controller.rb index a6d077dd..c51aeaae 100755 --- a/app/controllers/spectrums_controller.rb +++ b/app/controllers/spectrums_controller.rb @@ -468,21 +468,6 @@ def match render html: @spectrum.find_match_in_set(params[:set]).to_json end - # Start doing this client side! - def setsamplerow - require 'rubygems' - require 'rmagick' - @spectrum = Spectrum.find params[:id] - require_ownership(@spectrum) - image = Magick::ImageList.new('public' + (@spectrum.photo.url.split('?')[0]).gsub('%20', ' ')) - @spectrum.sample_row = (params[:row].to_f * image.rows) - @spectrum.extract_data - @spectrum.save - flash[:warning] = "If this spectrum image is not perfectly vertical, you may need to recalibrate after setting a new cross-section." - redirect_to spectrum_path(@spectrum) - end - - # Start doing this client side! def find_brightest_row @spectrum = Spectrum.find params[:id] require_ownership(@spectrum) diff --git a/app/models/spectrum.rb b/app/models/spectrum.rb index 6efb3a15..36abe5c2 100755 --- a/app/models/spectrum.rb +++ b/app/models/spectrum.rb @@ -114,7 +114,8 @@ def self.weekly_tallies # finds the brightest row of the image and uses that as its sample row def find_brightest_row - image = Magick::ImageList.new('public' + (photo.url.split('?')[0]).gsub('%20', ' ')) + photo.copy_to_local_file(:original) + image = Magick::ImageList.new(local_photo_path) brightest_row = 0 brightest = 0 # sum brightness for each row @@ -140,7 +141,8 @@ def find_brightest_row def extract_data pixels = [] - image = Magick::ImageList.new('public' + (photo.url.split('?')[0]).gsub('%20', ' ')) + photo.copy_to_local_file(:original) + image = Magick::ImageList.new(local_photo_path) # saved sample_row may be greater than image height, so temporarily compensate, # but preserve sample_row in case we rotate back or something self.sample_row = image.rows - 2 if sample_row > image.rows @@ -278,7 +280,8 @@ def clone_calibration(clone_id) # rotate clockwise def rotate - image = Magick::ImageList.new('public' + (photo.url.split('?')[0]).gsub('%20', ' ')) + photo.copy_to_local_file(:original) + image = Magick::ImageList.new(local_photo_path) image.rotate!(-90) image.write('public' + photo.url) photo.reprocess! @@ -286,7 +289,8 @@ def rotate # horizontally flips image to match reversed spectrum, toggles 'reversed' flag def reverse - image = Magick::ImageList.new('public' + (photo.url.split('?')[0]).gsub('%20', ' ')) + photo.copy_to_local_file(:original) + image = Magick::ImageList.new(local_photo_path) image.flop! image.write('public' + photo.url) self.reversed = !reversed @@ -629,4 +633,9 @@ def find_similar(range) def spectrum_params params.require(:spectrum).permit(:title, :author, :user_id, :notes, :photo, :video_row, :data) end -end + + def local_photo_path + 'public' + (photo.url.split('?')[0]).gsub('%20', ' ') + end + +end \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index b3d9f2ed..f35294c4 100755 --- a/config/routes.rb +++ b/config/routes.rb @@ -160,7 +160,6 @@ get 'spectrums/rss' => 'spectrums#rss' get 'spectrums/find_brightest_row' => 'spectrums#find_brightest_row' get 'spectrums/upload' => 'spectrums#upload' - get 'spectrums/setsamplerow' => 'spectrums#setsamplerow' get 'spectrums/rotate' => 'spectrums#rotate' get 'spectrums/fork' => 'spectrums#fork' get 'spectrums/reverse' => 'spectrums#reverse' From ada364c14c4d1b019a93b8649ba6d05e114dde09 Mon Sep 17 00:00:00 2001 From: Sebastian Silva Date: Tue, 28 Dec 2021 10:02:34 -0500 Subject: [PATCH 05/11] initial changes to implement fog cloud storage library --- config/initializers/paperclip_string.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/initializers/paperclip_string.rb b/config/initializers/paperclip_string.rb index cbe60a07..b6edce9d 100644 --- a/config/initializers/paperclip_string.rb +++ b/config/initializers/paperclip_string.rb @@ -6,7 +6,7 @@ Paperclip::Attachment.default_options[:storage] = :fog Paperclip::Attachment.default_options[:fog_directory] = ENV["GOOGLE_STORAGE_BUCKET_NAME"] || '' -Paperclip::Attachment.default_options[:path] = ":rails_root/public/system/:attachment/:id/:style/:filename" +Paperclip::Attachment.default_options[:path] = ":rails_root/public/system/public/system/:class/:attachment/:id_partition/:style/:filename" Paperclip::Attachment.default_options[:fog_credentials] = { provider: ENV["FOG_PROVIDER"] || "Local", local_root: "#{Rails.root}/public", From 9735504835b46bf7594d8cbbc0ebc48fa8e5f01f Mon Sep 17 00:00:00 2001 From: Jeffrey Warren Date: Tue, 4 Jan 2022 14:05:38 -0500 Subject: [PATCH 06/11] Update config/initializers/paperclip_string.rb --- config/initializers/paperclip_string.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/initializers/paperclip_string.rb b/config/initializers/paperclip_string.rb index b6edce9d..cbe60a07 100644 --- a/config/initializers/paperclip_string.rb +++ b/config/initializers/paperclip_string.rb @@ -6,7 +6,7 @@ Paperclip::Attachment.default_options[:storage] = :fog Paperclip::Attachment.default_options[:fog_directory] = ENV["GOOGLE_STORAGE_BUCKET_NAME"] || '' -Paperclip::Attachment.default_options[:path] = ":rails_root/public/system/public/system/:class/:attachment/:id_partition/:style/:filename" +Paperclip::Attachment.default_options[:path] = ":rails_root/public/system/:attachment/:id/:style/:filename" Paperclip::Attachment.default_options[:fog_credentials] = { provider: ENV["FOG_PROVIDER"] || "Local", local_root: "#{Rails.root}/public", From 16d595c103c623de330ace47d17a3526b1cb1b3a Mon Sep 17 00:00:00 2001 From: jywarren Date: Tue, 25 Jan 2022 22:30:13 +0000 Subject: [PATCH 07/11] ,local_photo_path added to copy_to_local_file() --- app/models/spectrum.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models/spectrum.rb b/app/models/spectrum.rb index 36abe5c2..709427c1 100755 --- a/app/models/spectrum.rb +++ b/app/models/spectrum.rb @@ -114,7 +114,7 @@ def self.weekly_tallies # finds the brightest row of the image and uses that as its sample row def find_brightest_row - photo.copy_to_local_file(:original) + photo.copy_to_local_file(:original,local_photo_path) image = Magick::ImageList.new(local_photo_path) brightest_row = 0 brightest = 0 @@ -141,7 +141,7 @@ def find_brightest_row def extract_data pixels = [] - photo.copy_to_local_file(:original) + photo.copy_to_local_file(:original,local_photo_path) image = Magick::ImageList.new(local_photo_path) # saved sample_row may be greater than image height, so temporarily compensate, # but preserve sample_row in case we rotate back or something @@ -280,7 +280,7 @@ def clone_calibration(clone_id) # rotate clockwise def rotate - photo.copy_to_local_file(:original) + photo.copy_to_local_file(:original,local_photo_path) image = Magick::ImageList.new(local_photo_path) image.rotate!(-90) image.write('public' + photo.url) @@ -289,7 +289,7 @@ def rotate # horizontally flips image to match reversed spectrum, toggles 'reversed' flag def reverse - photo.copy_to_local_file(:original) + photo.copy_to_local_file(:original,local_photo_path) image = Magick::ImageList.new(local_photo_path) image.flop! image.write('public' + photo.url) From eeb34467dd0073733cd9918cf539fd20f9f81634 Mon Sep 17 00:00:00 2001 From: jywarren Date: Tue, 25 Jan 2022 22:32:20 +0000 Subject: [PATCH 08/11] remove old test --- test/controllers/spectrums_controller_test.rb | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/test/controllers/spectrums_controller_test.rb b/test/controllers/spectrums_controller_test.rb index 9911dc7d..cc0f9664 100755 --- a/test/controllers/spectrums_controller_test.rb +++ b/test/controllers/spectrums_controller_test.rb @@ -405,17 +405,6 @@ class SpectrumsControllerTest < ActionController::TestCase assert_response :redirect end - test 'should set sample row to spectrum' do - session[:user_id] = users(:admin).id - spectrum = Spectrum.last - spectrum.image_from_dataurl('data:image/gif;base64,R0lGODdhMAAwAPAAAAAAAP///ywAAAAAMAAwAAAC8IyPqcvt3wCcDkiLc7C0qwyGHhSWpjQu5yqmCYsapyuvUUlvONmOZtfzgFzByTB10QgxOR0TqBQejhRNzOfkVJ+5YiUqrXF5Y5lKh/DeuNcP5yLWGsEbtLiOSpa/TPg7JpJHxyendzWTBfX0cxOnKPjgBzi4diinWGdkF8kjdfnycQZXZeYGejmJlZeGl9i2icVqaNVailT6F5iJ90m6mvuTS4OK05M0vDk0Q4XUtwvKOzrcd3iq9uisF81M1OIcR7lEewwcLp7tuNNkM3uNna3F2JQFo97Vriy/Xl4/f1cf5VWzXyym7PHhhx4dbgYKAAA7') - spectrum.save - post :setsamplerow, params: { id: spectrum.id } - assert_equal "If this spectrum image is not perfectly vertical, you may need to recalibrate after setting a new cross-section.", flash[:warning] - assert_response :redirect - assert_redirected_to spectrum_path(spectrum) - end - test 'should do clone search' do get :clone_search, params: { id: Spectrum.first.id, From 37da66e5f8c68afd13f85373af32bd7dec2da72b Mon Sep 17 00:00:00 2001 From: jywarren Date: Tue, 25 Jan 2022 22:40:44 +0000 Subject: [PATCH 09/11] save to tmp --- app/models/spectrum.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/spectrum.rb b/app/models/spectrum.rb index 709427c1..adf9fa36 100755 --- a/app/models/spectrum.rb +++ b/app/models/spectrum.rb @@ -635,7 +635,8 @@ def spectrum_params end def local_photo_path - 'public' + (photo.url.split('?')[0]).gsub('%20', ' ') + #'public' + (photo.url.split('?')[0]).gsub('%20', ' ') + "/tmp/#{self.id}" end end \ No newline at end of file From 8bf028661ca5f4dcad96ca9b26f36cea08997851 Mon Sep 17 00:00:00 2001 From: Jeffrey Warren Date: Tue, 8 Feb 2022 17:15:22 -0500 Subject: [PATCH 10/11] add: image.write(local_photo_path) --- app/models/spectrum.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/spectrum.rb b/app/models/spectrum.rb index adf9fa36..0f20b42f 100755 --- a/app/models/spectrum.rb +++ b/app/models/spectrum.rb @@ -283,7 +283,7 @@ def rotate photo.copy_to_local_file(:original,local_photo_path) image = Magick::ImageList.new(local_photo_path) image.rotate!(-90) - image.write('public' + photo.url) + image.write(local_photo_path) photo.reprocess! end @@ -292,7 +292,7 @@ def reverse photo.copy_to_local_file(:original,local_photo_path) image = Magick::ImageList.new(local_photo_path) image.flop! - image.write('public' + photo.url) + image.write(local_photo_path) self.reversed = !reversed photo.reprocess! end @@ -639,4 +639,4 @@ def local_photo_path "/tmp/#{self.id}" end -end \ No newline at end of file +end From 3e33b58f39fd51006d8d7a37677e39dbdcd6592c Mon Sep 17 00:00:00 2001 From: Sebastian Silva Date: Tue, 15 Feb 2022 12:50:30 -0500 Subject: [PATCH 11/11] Avoid resetting database on rebuild --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 3e74f690..18f0fbf1 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ endef redeploy-container: docker-compose build - docker-compose down --volumes + docker-compose down docker-compose up -d $(call wait_for_container) docker-compose logs