0
0
Remixframework~20 mins

Deploying to Fly.io in Remix - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Fly.io Remix Deployment Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
component_behavior
intermediate
2:00remaining
Understanding Remix app behavior after Fly.io deployment

You deployed a Remix app to Fly.io. The app uses environment variables for API keys. After deployment, the app crashes with a missing environment variable error. What is the most likely cause?

AThe environment variables were not set in the Fly.io app configuration.
BFly.io does not support environment variables for Remix apps.
CFly.io requires environment variables to be declared in a .env file inside the deployed container.
DThe Remix app must include environment variables in the source code before deployment.
Attempts:
2 left
💡 Hint

Think about how environment variables are managed on Fly.io after deployment.

📝 Syntax
intermediate
2:00remaining
Fly.io configuration file syntax for Remix app

Which of the following fly.toml snippets correctly sets the build and start commands for a Remix app?

A
[build]
  builder = "heroku/buildpacks:20"

[deploy]
  release_command = "npm run build"

[env]
  PORT = "8080"

[[services]]
  internal_port = 8080
  protocol = "tcp"
  script = "npm start"
B
[build]
  builder = "heroku/buildpacks:20"

[deploy]
  release_command = "npm run build"

[env]
  PORT = "8080"

[[services]]
  internal_port = 8080
  protocol = "tcp"
  command = "npm start"
C
[build]
  builder = "heroku/buildpacks:20"

[env]
  PORT = "8080"

[[services]]
  internal_port = 8080
  protocol = "tcp"
  command = "npm start"
D
[build]
  builder = "heroku/buildpacks:20"

[env]
  PORT = "8080"

[[services]]
  internal_port = 8080
  protocol = "tcp"
  command = "npm run build && npm start"
Attempts:
2 left
💡 Hint

Fly.io uses release_command for build steps and command under services for start commands.

🔧 Debug
advanced
2:00remaining
Diagnosing Remix app crash on Fly.io with database connection

Your Remix app deployed on Fly.io crashes immediately after startup. Logs show a database connection timeout. What is the most probable cause?

AFly.io does not support external database connections.
BThe Remix app must include database credentials in the source code before deployment.
CThe database URL environment variable is missing or incorrect in Fly.io configuration.
DFly.io requires a special database adapter for Remix apps.
Attempts:
2 left
💡 Hint

Check how your app accesses the database connection string on Fly.io.

state_output
advanced
2:00remaining
Fly.io app scaling behavior with Remix

You deployed a Remix app on Fly.io with 3 instances. You update the app and deploy a new version. What happens to the running instances during deployment?

AFly.io requires manual restart of instances after deployment.
BFly.io stops all old instances first, then starts new ones, causing downtime.
CFly.io updates instances one by one but does not start new instances until old ones stop.
DFly.io starts new instances with the new version before stopping old ones, ensuring zero downtime.
Attempts:
2 left
💡 Hint

Think about how Fly.io handles rolling deployments.

🧠 Conceptual
expert
3:00remaining
Fly.io persistent storage with Remix apps

Fly.io apps are ephemeral by default. You want to store user-uploaded files persistently in your Remix app deployed on Fly.io. Which approach is best?

AFly.io does not support persistent storage; use an external service like S3.
BStore files in the app container's local filesystem; Fly.io keeps it persistent automatically.
CUse Fly.io volumes to mount persistent storage and save files there.
DSave files in environment variables as base64 strings.
Attempts:
2 left
💡 Hint

Consider Fly.io's ephemeral container nature and best practices for file storage.