Tag: ruby on rails

dockerize a Rails app, error Postgres

I’m trying to dockerize a Rails app. The problem I get is that I get this error: PG::ConnectionBad: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket “/var/run/postgresql/.s.PGSQL.5432”? The docker container that holds the Postgres(running btw): 3e11664277b3 postgres:9.6.1 “/docker-entrypoint.s” 2 days ago […]

Rails 5 apps connected to Docker + Puma (Nginx) + PostgreSQL

I’ve seen a few tutorials but cannot manage to set it up just as I’d like. I have a number of Rails apps which I do not want to place inside a Docker container as it makes things such as running tasks or migrations a bit annoying. However, I’d like to connect these apps to […]

Multiple commands during docker run

I am new to docker and I created a docker image which runs a rails app. Now I want to run the app in background as a deamon, but it keeps on bailing out on me: docker run -d -p 2000:2000 image_name “source ~/.bash_profile; cd src; rails s” As you can see, my rails app […]

How to run rails app in docker container with nginx running on host machine?

I’m working on the scenario where I need to have: 1. nginx running on the host machine 2. rails app running inside docker container My initial work included adding Dockerfile into rails app directory on host which looks like this: ubuntu@ubuntu-xenial:~/rails_docker$ cat Dockerfile FROM ruby:2.1-onbuild ENV HOME /home/rails/webapp RUN apt-get update -qq && apt-get install […]

How to deploy a Rails app with GitLab CI + Docker + Ansible?

I have a hosted GitLab with some Ruby on Rails project on it. I have a CI script, that builds a Docker image with the project and push it to the GitLab registry. Finally, I need to deploy that image to the staging server. stages: – test – build – deploy # … build_image: stage: […]

Docker with foreman

Is there anyway to stop my container from exiting when running my Rails server with foreman. When foreman does its thing and starts up my rails server and sidekiq it immediately exits with exit code 0 as expected. Is there any way to prevent this behaviour and keep the container running?

Why rancher service disconnected sometimes?

I used Rancher to deploy a Rails application. I created two services. One used for install node packages and db migration. The other one used for Rails application. The second service works well. But the first one sometimes disconnected. So it is necessary to install the node packages again. It’s crazy! The services are: a. […]

Docker with a Rails App-Workers not running

So I have a Rails Application that has multiple types of workers. I decided to try and run the rails app with Docker, with a separate image for each type of worker (Resque, DelayedJob, a scheduler, different configurations). The problem is that the workers with queues (DelayedJob + Resque) are not picking up jobs (using […]

Docker Rails Tutorial generated files not exists

I am trying basic Docker & Rails tutorials on my windows10 home OS with Docker toolbox. Client: 17.05.0-ce Server: 17.06.0-ce And hello-world tutorials works! Now I am trying this youtube tutorial: https://www.youtube.com/watch?v=KH6pcHb6Wug&lc=z12ocxayznynslzjj04chbtgiwbhuf4z5xk0k.1499518307572479 And everything looks okay until I check rails generated project files. In terminal showing like files are generating but when I use the […]

How to change Ruby and Rails version for the Rails base Docker image?

Docker base image rails provides a full environment for Ruby on Rails. It pulls from the ruby upstream image. The rails base image specifies Ruby and Ruby on Rails versions. What if we want to use different Ruby and Ruby on Rails versions? Do we edit our Dockerfile in our project folder? Or, do we […]

Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.