Skip to content

Commit

Permalink
modify dockefile to work
Browse files Browse the repository at this point in the history
  • Loading branch information
Liz Johnson committed Sep 5, 2023
1 parent c52e218 commit 510d4b6
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 74 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ COPY . /myapp
# Building the frontend assets from the frontend directory
# the project.json specifies a build path so they will be built into the /public/static directory and rails can serve them
WORKDIR /myapp/frontend
RUN npm install && npm run build
RUN npm install --legacy-peer-deps && npm run build
#
WORKDIR /myapp

Expand Down
7 changes: 7 additions & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ class Application < Rails::Application
config.middleware.use ActionDispatch::Cookies

config.middleware.use config.session_store, config.session_options

config.middleware.insert_before 0, Rack::Cors do
allow do
origins '*'
resource '*', :headers => :any, :methods => [:get, :post, :patch, :put, :options]
end
end
# Configuration for the application, engines, and railties goes here.
#
# These settings can be overridden in specific environments using the files
Expand Down
6 changes: 0 additions & 6 deletions config/initializers/cors.rb

This file was deleted.

Loading

0 comments on commit 510d4b6

Please sign in to comment.