Description
In this course, you will learn :
- How to get your Rails app ready for production. Once ready, you will provision machines, create a cluster, deploy the app, and scale its resources to meet its changing needs using Docker's own tools.
- You will then work to get your Dockerized setup to cooperate with JavaScript, utilising both the standard asset pipeline and webpacker, Rails' newest approach for integrating modern JavaScript front ends.
- Learn the Docker fundamentals you need to know to get you off the ground
- Get your hands dirty making and running the real Rails app
- Learn how Compose allows adding multiple services
- Learn to integrate a frontend option with your Rails app
- Use Docker to deploy the Rails app to Cloud
Syllabus :
1. A Brave New World
- Basic Concepts — Images and Containers
- Running a Ruby Script Without Ruby Installed
- Generating a New Rails App Without Ruby Installed
- Docker Architecture
2. Running a Rails App in a Container
- How Do We Run Our Rails App?
- Dockerfile Creation and Explanation
- Defining Our First Custom Image
- Running a Rails Server with Our Image
3. Fine-Tuning Our Rails Image
- A Default Command
- .dockerignore File
- The Image Build Cache
- Caching Issues
4. Describing Our App Declaratively with Docker Compose
- Getting Started with Compose
- Launching the Rails app
- Mounting a Volume Using Compose and Sharing Images
- Starting and stopping services
- Other Common Tasks
5. Beyond the App: Adding Redis
- Starting a Redis Server
- Making a Manual Connection to Redis Server
- Learning How Containers Communicate
- Our Rails App and Redis Communication
6. Adding a Database: Postgres
- Starting a Postgres Server
- Connecting to Postgres from a Separate Container
- Creating Our App Databases
- Restarting Our Rails Server with Database
- Decoupling Data From a Container
7. Playing Nice with JavaScript
- Front-End Options
- Compiling Assets with Webpacker
- A Hello World React App
8. Testing in a Dockerized Environment
- Ruby Testing Framework: RSpec
- Our First Test using RSpec
- Setting Up Rails System Tests
- Running Tests: Providing Support for JavaScript
- Running Tests: Configuring RSpec
- Seeing the Tests Run
- Debugging
9. Advanced Gem Management
- The Downside to Our Existing Approach
- Solution To Manage Gems Effectively
- Testing The New Method Of Gem Management
10. Some Minor Irritations
- Rails Server not starting?
- Server Not Shutting Down Gracefully
- Quick Recap
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?
12. Preparing for Production
- Configuring a Production Environment
- A Production Image
- How to make Custom Image
13. A Production-Like Playground
- Production-Like Environment
- Exploring the Docker Machine
- Introducing Docker 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
14. Deploying to the Cloud
- The Cloud: Our Final Frontier
- Deploying to AWS
- Visualizing Containers
- Scaling Up
- Cleaning Up
- Deploying to DigitalOcean