Skip to content

Commit

Permalink
FlyIO and application (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsomel21 authored Jun 20, 2023
2 parents be2512e + 4c06499 commit 49b05c1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
6 changes: 2 additions & 4 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,14 @@ class Application < Rails::Application

config.middleware.insert_before 0, Rack::Cors do
allow do
origins 'https://spg.dev/', 'localhost:3000', 'localhost:3001'
origins 'https://spg.dev', /\A.*\.netlify\.app\z/

resource '*',
headers: :any,
methods: [:get]
methods: [:get]
end
end



# Configuration for the application, engines, and railties goes here.
#
# These settings can be overridden in specific environments using the files
Expand Down
9 changes: 3 additions & 6 deletions fly.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,12 @@ console_command = "/rails/bin/rails console"
# This forces all HTTP connections to be redirected to HTTPS for secure communication.
# We don't have to worry about setting it to 443, I think Fly.io does that automatically.
force_https = true

# When true, Fly.io will automatically stop instances when they're not needed to save resources.
auto_stop_machines = true

# When true, Fly.io will automatically start instances when they're needed.
auto_start_machines = true
auto_stop_machines = false

# Minimum number of instances running at all times.
min_machines_running = 0
min_machines_running = 1

# Configuration for static files. In this case, we are serving the files in the /app/public directory at the root URL ("/").
[[statics]]
Expand Down

0 comments on commit 49b05c1

Please sign in to comment.