# actioncable

Published articles for actioncable.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Dockerizing a Rails application

DevFeed: [Dockerizing a Rails application](<https://devfeed.tech/articles/dockerizing-a-rails-application-37444.md>)

Original publisher: [Read original article](<https://iridakos.com/programming/2019/04/07/dockerizing-a-rails-application>)

Author: Lazarus Lazaridis

Published: 2019-04-07T01:00:00Z

Content type: tutorial

Language: en

Sources: [Lazarus Lazaridis](<https://devfeed.tech/sources/lazarus-lazaridis.md>)

Topics: [Docker](<https://devfeed.tech/topics/docker.md>), [Rails](<https://devfeed.tech/topics/rails.md>), [container](<https://devfeed.tech/topics/container.md>), [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [Redis](<https://devfeed.tech/topics/redis.md>), [Dockerfile](<https://devfeed.tech/topics/dockerfile.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>), [configuration](<https://devfeed.tech/topics/configuration.md>), [Ubuntu](<https://devfeed.tech/topics/ubuntu.md>), [Development](<https://devfeed.tech/topics/development.md>)

Tags: [actioncable](<https://devfeed.tech/tags/actioncable.md>), [apt](<https://devfeed.tech/tags/apt.md>), [certificates](<https://devfeed.tech/tags/certificates.md>), [chat](<https://devfeed.tech/tags/chat.md>), [cli](<https://devfeed.tech/tags/cli.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [container](<https://devfeed.tech/tags/container.md>), [curl](<https://devfeed.tech/tags/curl.md>), [docker](<https://devfeed.tech/tags/docker.md>), [docker-image](<https://devfeed.tech/tags/docker-image.md>), [installation](<https://devfeed.tech/tags/installation.md>), [postgres](<https://devfeed.tech/tags/postgres.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [programming](<https://devfeed.tech/tags/programming.md>), [rails](<https://devfeed.tech/tags/rails.md>), [redis](<https://devfeed.tech/tags/redis.md>), [ruby](<https://devfeed.tech/tags/ruby.md>), [run](<https://devfeed.tech/tags/run.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>), [ubuntu](<https://devfeed.tech/tags/ubuntu.md>)

### AI overview

A tutorial on Dockerizing a Rails chat application. It covers installing Docker, configuring the application for PostgreSQL, building a Docker image with a Dockerfile, and running PostgreSQL, Redis, and application containers.

### Source excerpt

Hey! In this post we are going to: create a docker image for the Rails chat application that we created in the previous post configure the Docker environment and run the application by: creating a container for the PostgreSQL database creating a container for the Redis server creating a container with the required configuration from the image we built Prerequisites Install docker The first thing you need in order to follow this tutorial is to install Docker on your machine. We are going to use the Docker Community Edition. Follow the installation instructions matching your system. I'm on Ubuntu 18.04 LTS so following the instructions, I had to: Uninstall previous versions with: sudo apt-get remove docker docker-engine docker.io containerd runc I chose to install the application using the repository. sudo apt-get update sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ gnupg-agent \ software-properties-common curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - and I verified that I had the key with the proper fingerprint after executing: sudo apt-key fingerprint 0EBFCD88 I set up the repository with: sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable" The installation took place with these commands: sudo apt-get update sudo apt-get install docker-ce docker-ce-cli containerd.io I checked that the installation was successful with: $ sudo docker run hello-world Unable to find image 'hello-world:latest' locally latest: Pulling from library/hello-world 1b930d010525: Pull complete Digest: sha256:... Status: Downloaded newer image for hello-world:latest Hello from Docker! This message shows that your installation appears to be working correctly. To generate this message, Docker took the following steps: 1. The Docker client contacted the Docker daemon. 2. The Docker daemon pulled the "hello-world" image from the Docker Hub. (amd64) 3. The Docker daemon created a new

## Creating a chat application from scratch using Rails and WebSockets

DevFeed: [Creating a chat application from scratch using Rails and WebSockets](<https://devfeed.tech/articles/creating-a-chat-application-from-scratch-using-rails-and-websockets-37443.md>)

Original publisher: [Read original article](<https://iridakos.com/programming/2019/04/04/creating-chat-application-rails-websockets>)

Author: Lazarus Lazaridis

Published: 2019-04-04T20:00:00Z

Content type: tutorial

Language: en

Sources: [Lazarus Lazaridis](<https://devfeed.tech/sources/lazarus-lazaridis.md>)

Topics: [WebSocket](<https://devfeed.tech/topics/websocket.md>), [Rails](<https://devfeed.tech/topics/rails.md>), [web applications](<https://devfeed.tech/topics/web-applications.md>), [Ruby](<https://devfeed.tech/topics/ruby.md>), [Web Development](<https://devfeed.tech/topics/web-development.md>)

Tags: [actioncable](<https://devfeed.tech/tags/actioncable.md>), [application](<https://devfeed.tech/tags/application.md>), [bootstrap](<https://devfeed.tech/tags/bootstrap.md>), [chat](<https://devfeed.tech/tags/chat.md>), [code](<https://devfeed.tech/tags/code.md>), [devise](<https://devfeed.tech/tags/devise.md>), [featured](<https://devfeed.tech/tags/featured.md>), [programming](<https://devfeed.tech/tags/programming.md>), [rails](<https://devfeed.tech/tags/rails.md>), [redis](<https://devfeed.tech/tags/redis.md>), [ruby](<https://devfeed.tech/tags/ruby.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>), [websocket](<https://devfeed.tech/tags/websocket.md>), [websockets](<https://devfeed.tech/tags/websockets.md>)

### AI overview

A tutorial for building a chat web application from scratch with Rails and WebSockets. It explains WebSocket bidirectional communication and real-time data transfer, then introduces the Ruby and Rails versions used for the application.

### Source excerpt

Hey! It's been a while since my last post. I recently familiarized myself with the awesomeness of WebSockets and I finally found the time to write a tutorial about it. I hope you find it helpful. Update: I also published another post for dockerizing the application of this tutorial, you can find it here. Introduction In this tutorial we are going to create a chat web application from scratch using Rails and WebSockets. Code and comments You can find the code of this tutorial on GitHub. For feedback, comments, typos etc. please open an issue in the repository. What are WebSockets WebSocket is actually a protocol that enables bidirectional communication between the client and the server of a web application over a single long living TCP connection. The WebSocket protocol enables interaction between a web browser (or other client application) and a web server with lower overheads, facilitating real-time data transfer from and to the server. This is made possible by providing a standardized way for the server to send content to the client without being first requested by the client, and allowing messages to be passed back and forth while keeping the connection open. In this way, a two-way ongoing conversation can take place between the client and the server. The communications are done over TCP port number 80 (or 443 in the case of TLS-encrypted connections), which is of benefit for those environments which block non-web Internet connections using a firewall. Similar two-way browser-server communications have been achieved in non-standardized ways using stopgap technologies such as Comet. - WebSocket @ Wikipedia Why WebSockets Suppose you have to create a web page that shows the statuses of running processes. Without WebSockets you would have to either: Use AJAX with Javascript intervals to request and render the latest state of the processes or Automatically reload the page every x seconds (<meta http-equiv="refresh" content="x">) or Add a message on the page "The stat