MapView is a server-side map rendering engine for Rails built as a three-layer stack: ruby-libgd (C graphics wrapper), libgd-gis (GIS raster engine), and a Rails gem integration layer. The post covers the full production architecture deployed on Railway, including a zero-downtime CI/CD pipeline triggered by GitHub pushes, Dockerfile optimization with multi-stage builds, Rails 8 encrypted credentials management, PostGIS spatial indexing, background job rendering with Sidekiq, Redis fragment caching, and disaster recovery via Railway's automated PostgreSQL backups. Lessons learned include master key injection, migration timing issues, and memory sizing for Ruby processes.

8m read timeFrom rubystacknews.com
Post cover image
Table of contents
IntroductionProject ArchitectureThree-Layer StackSeparation of ConcernsThe Demo ApplicationDeployment Architecture on RailwayProject StructureServices on RailwayNetworkingCI/CD PipelineLocal Development → GitHubDeployment FlowDockerfile OptimizationHandling Secrets and ConfigurationEncrypted CredentialsEnvironment VariablesDatabase MigrationsMonitoring and DebuggingLogsError TrackingHealth ChecksPerformance ConsiderationsRender TimeCachingDatabase QueriesDisaster RecoveryBackupsRollback StrategyCost OptimizationResource SizingCold Start OptimizationAsset DeliveryLessons LearnedWhat Worked WellChallenges OvercomeConclusionGetting StartedShare this:Related

Sort: