ENGLISH

Docker for Rails Developers: Build, Ship, and Run Your Applications Everywhere

Book information

Publisher
Pragmatic Bookshelf
Year
2019
ISBN
1680502735, 9781680502732
Language
english
Format
PDF
Filesize
5 MB (5064683 bytes)
Series
Pragmatic Programmers
Pages
214\225
Time added
2020-06-15 18:11:27

Description

Docker does for DevOps what Rails did for web development--it gives you a new set of superpowers. Gone are "works on my machine" woes and lengthy setup tasks, replaced instead by a simple, consistent, Docker-based development environment that will have your team up and running in seconds. Gain hands-on, real-world experience with a tool that's rapidly becoming fundamental to software development. Go from zero all the way to production as Docker transforms the massive leap of deploying your app in the cloud into a baby step. Docker makes life as a Ruby and Rails developer easier. It helps build, ship, and run your applications, solving major problems you face every day. It allows you to run applications at scale, adding new resources as needed. Docker provides a reliable, consistent environment that's guaranteed to work the same everywhere. Docker lets you do all things DevOps without needing a PhD in infrastructure and operations. Want to spin up a cluster to run your app? No problem. Scale it up or down at will? You bet. Start by running a Ruby script without having Ruby installed on the local machine. Then Dockerize a Rails application and run it using containers, including creating your own custom Docker images tailored for running Rails apps. Describe your app declaratively using Docker Compose, specifying the software dependencies along with everything needed to run the application. Then set up continuous integration, as well as your deployment pipeline and infrastructure. Along the way, find out the best practices for using Docker in development and production environments. This book gives you a solid foundation on using Docker and fitting it into your development workflow and deployment process. What You Need: All you need is a Windows, Mac OS X or Linux machine to do development on. This book guides you through the process of installing Docker. Some basic familiarity with Linux/Unix is recommended even if you're using a Windows machine. Cover Table of Contents Acknowledgements Introduction What Is Docker? Why Use Docker? Who Should Read This Book? What’s in This Book? How to Read This Book Which Operating Systems Are Supported? Online Resources Part I—Development 1. A Brave New World Installing Docker Verifying Your Install Before We Begin Running a Ruby Script Without Ruby Installed Generating a New Rails App Without Ruby Installed Quick Recap 2. Running a Rails App in a Container How Do We Run Our Rails App? Defining Our First Custom Image Building Our Image Running a Rails Server with Our Image Reaching the App: Publishing Ports Binding the Rails Server to IP Addresses Quick Recap 3. Fine-Tuning Our Rails Image Naming and Versioning Our Image A Default Command Ignoring Unnecessary Files The Image Build Cache Caching Issue 1: Updating Packages Caching Issue 2: Unnecessary Gem Installs The Finishing Touch Quick Recap 4. Describing Our App Declaratively with Docker Compose Getting Started with Compose Launching Our App Mounting a Local Volume Starting and Stopping Services Other Common Tasks Quick Recap 5. Beyond the App: Adding Redis Starting a Redis Server Manually Connecting to the Redis Server How Containers Can Talk to Each Other Our Rails App Talking to Redis Starting the Entire App with Docker Compose Quick Recap 6. Adding a Database: Postgres Starting a Postgres Server Connecting to Postgres from a Separate Container Connecting Our Rails App to Postgres Using the Database in Practice Decoupling Data from the Container Quick Recap 7. Playing Nice with JavaScript The JavaScript Front-End Options Rails JavaScript Front End with Webpacker Compiling Assets with Webpacker A Hello World React App Quick Recap 8. Testing in a Dockerized Environment Setting Up RSpec Our First Test Setting Up Rails System Tests Running Tests That Rely on JavaScript Debugging Quick Recap 9. Advanced Gem Management The Downside to Our Existing Approach Using a Gem Cache Volume Quick Recap 10. Some Minor Irritations Rails tmp/pids/server.pid Not Cleaned Up Compose Intermittently Aborts with Ctrl-C Quick Recap Closing Thoughts on Docker in Development Part II—Toward Production 11. The Production Landscape The “Ops” in DevOps Container Orchestration A Tale of Two Orchestrators: Swarm and Kubernetes IaaS vs. CaaS Provisioning Your Infrastructure CaaS Platforms Serverless for Containers How to Decide What’s Right for Me? Quick Recap 12. Preparing for Production Configuring a Production Environment A Production Image: Precompiling Assets Sharing Images Quick Recap 13. A Production-Like Playground Creating Machines Introducing Docker Swarm Our First (Single Node) Swarm Describing Our App to Swarm Migrating the Database Deploying Our App on a Swarm Tasks and Swarm’s Scaling Model Scaling Up the Service Quick Recap 14. Deploying to the Cloud Creating a DigitalOcean Cluster Deploying to Our DigitalOcean Swarm Visualizing Containers Scale Up the Web Service Deploying to AWS Instead of DigitalOcean Quick Recap 15. Closing Thoughts and Next Steps What Should I Learn About Next? A1. Platform Differences File Ownership and Permissions A2. Finding Images to Use Using Docker Hub Using the Docker CLI Index – SYMBOLS – – A – – B – – C – – D – – E – – F – – G – – H – – I – – J – – K – – L – – M – – N – – O – – P – – Q – – R – – S – – T – – U – – V – – W – – Y –

Similar books

Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36

Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36

2010 · PDF

THE BRITISH ARMY IN INDIA: ITS PRESERVATION BY AN APPROPRIATE CLOTHING, HOUSING, LOCATING, RECREATIVE EMPLOYMENT, AND HOPEFUL ENCOURAGEMENT OF THE TROOPS. with AN APPENDIX ON INDIA : THE CLIMATE OP ITS HILLS ; THE DEVELOPMENT OF ITS RESODRCBS, INDUSTRY, AND ARTS ; THE ADMINISTRATION OF JUSTICE ; THE BLACK ACT ; THE PROGRESS OF CHRISTIANITY ; THE TRAFFIC IN OPIUM ; THE VALUE OF INDIA ; PERMANENT CAUSES OF DISAFFECTION, AND OF THE RECENT REBELLION ; THE TRADITIONARY POLICY; MISGOVERNMENT BY NATIVE RULERS ; ANNEXATIONS OF THEIR TERRITORY, ETC.

THE BRITISH ARMY IN INDIA: ITS PRESERVATION BY AN APPROPRIATE CLOTHING, HOUSING, LOCATING, RECREATIVE EMPLOYMENT, AND HOPEFUL ENCOURAGEMENT OF THE TROOPS. with AN APPENDIX ON INDIA : THE CLIMATE OP ITS HILLS ; THE DEVELOPMENT OF ITS RESODRCBS, INDUSTRY, AND ARTS ; THE ADMINISTRATION OF JUSTICE ; THE BLACK ACT ; THE PROGRESS OF CHRISTIANITY ; THE TRAFFIC IN OPIUM ; THE VALUE OF INDIA ; PERMANENT CAUSES OF DISAFFECTION, AND OF THE RECENT REBELLION ; THE TRADITIONARY POLICY; MISGOVERNMENT BY NATIVE RULERS ; ANNEXATIONS OF THEIR TERRITORY, ETC.

1858 · PDF