How to run a Rails 6 application using Docker Compose

How to run a Rails 6 application using Docker Compose

In the previous article we learned how to create a Rails 6 Docker image and run it locally. While useful for demonstration purposes, it is not enough for a real-world web application. In addition to our main application code, there are other services that we also need, like a database, a queue system, storage and so on.

Docker Compose provides a way for us to describe how our entire application works using declarative code. Declarative code means that we specify the final state of our application, rather than specifying what steps are needed to create our application. This results in a simpler, more intuitive configuration. Continue Reading

How to build a Rails 6 application using Docker

How to build a Rails 6 application using Docker

In the Introduction to Docker article, we developed a good basic foundational knowledge about container technology. Now, we will take it one step further by creating and running a Rails 6 application exclusively using Docker. As of this writing, Rails 6 is the latest version of the Ruby on Rails web application framework.

Generating the Rails code

We learned previously that we can run Ruby code using Docker even without having Ruby in our local machine. We can also use the container’s shell and run commands directly in the container. Using these, let’s try to perform some commands in a container running Ruby 2.7: Continue Reading

Introduction to Docker

Introduction to Docker

Docker is perhaps responsible for the proliferation of containers in application development. The concept of containers is quite old, and can be traced back in the 1980s by chroot wherein different user spaces can be used within the same operating system. Once Docker was introduced however, it paved the way for further developments in containerization and changed the way how we develop and deploy software.

In this article we will discuss how to install and setup Docker in your local machine. Common Docker commands will be introduced that will equip you with foundational knowledge for tackling the next steps in application development using containers (such as Compose). Continue Reading

More Lessons I Learned Working From Home

More Lessons I Learned Working From Home

In the previous article, we discussed the advantages and disadvantages to working from home. In a remote work setup, it is important to establish a fixed time and place for you to work. But there are more things that we need to take into account: communication and security. These are the additional lessons I learned while working remotely since 2012.

Communication is a high priority

My boss always emphasized that communication is the most important thing especially in the context of working remotely. If we are not able to communicate effectively, then the whole setup will fail. Continue Reading

Lessons I Learned Working From Home

Lessons I Learned Working From Home

We live in interesting times due to the COVID-19 pandemic. More and more companies are being forced to adopt a remote working setup (or working from home) for its employees. I have been working remotely full-time since 2012. This article discusses some of the lessons and tricks I learned throughout the years.

I understand that working from home does not apply to all industries. It is mostly applicable to jobs that involve working in front of a computer. My career is in software development which fits this set up comfortably. However it can also apply to other industries such as business process operations, accounting, and company administration. Continue Reading