Posts

Showing posts from March, 2022

[ToDoList] Docker Compose

Image
We learned in the previous section how Docker is a fantastic tool with which to build and deploy applications, however has some inconveniences with developing these apps such as having to rebuild the image every time there is a code change as well as any development database entries being wiped. This section will offer some relief against these two issues by using Docker Compose to build our application and make live code changes, as well as using a separate container to host our development database in PostgreSQL - this will encompass three main tasks: Back up and edit the Dockerfile we made in the previous section so our image can be built. Create our docker-compose.yml in the app's root directory to create our web & postgresql database containers. Back up and edit some our app's configuration (namely the database.yml & Gemfile ) to use the new postgresql container . After all this, we can set about ...

[ToDoList] Dockerising the App

Image
So we've covered all the basic Ruby and Rails magic that has allowed us to build a basic web application, as well as made it look like a passably professional piece of work. This certainly deserves another whoop of celebration if you're not already whooped out. However at this point, you might already have run into problems with the joys Ruby / Rails / Bundler / Node versions, particularly if you have been working on different systems. It is also entirely possible that you're a bit sick of the VM or online IDE you are using to build the app, and you are hoping for a better solution. The solution to both of these is the mighty Docker ( other container frameworks are available ). You may have already heard of Docker, being a tool that essentially revolutionised app development and deployment by using a funky little addition to the Linux kernel: namespaces . Think of these almost as Virtual Machines (though much, much cooler an...

Popular posts from this blog

[ToDoList] Basic Pages

New Rails Apps with Docker Compose

[ToDoList] Building the App