Rails CD with Docker, Github Actions and VPS

This page summarizes the projects mentioned and recommended in the original post on dev.to

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • Docker Compose

    Define and run multi-container applications with Docker

  • # Download the current stable release of Docker Compose # To install a different version of Compose, substitute 1.29.2 with the version of Compose you want to use. $ sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose # Apply executable permissions to the binary $ sudo chmod +x /usr/local/bin/docker-compose # Test the installation $ docker-compose --version

  • nginx-proxy

    Automated nginx proxy for Docker containers using docker-gen

  • For HTTP server I will use NGINX with this awesome application nginx-proxy and acme-companion for automatic SSL certificate generation. Connect to the server as nginx_proxy user and create two files docker-compose.yaml and nginx_custom.conf.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • acme-companion

    Automated ACME SSL certificate generation for nginx-proxy

  • For HTTP server I will use NGINX with this awesome application nginx-proxy and acme-companion for automatic SSL certificate generation. Connect to the server as nginx_proxy user and create two files docker-compose.yaml and nginx_custom.conf.

  • rubygems

    Library packaging and distribution for Ruby.

  • $ docker build -t rails_app . Sending build context to Docker daemon 86.65MB Step 1/6 : FROM ruby:3.0.1 3.0.1: Pulling from library/ruby d960726af2be: Pull complete ## part ommited Status: Downloaded newer image for ruby:3.0.1 ---> 9cba361e78fe Step 2/6 : RUN apt-get update && apt-get install -y build-essential libpq-dev nodejs zlib1g-dev liblzma-dev ---> Running in fa0bce0b6b81 Get:1 http://deb.debian.org/debian buster InRelease [121 kB] ## part ommited Removing intermediate container 40b752bd0ef3 ---> 7d09aa5c9ced Step 3/6 : WORKDIR /app ---> Running in 427dea58acb0 Removing intermediate container 427dea58acb0 ---> 8ed87d4b0643 Step 4/6 : COPY . . ---> 0b3a695a0987 Step 5/6 : RUN bundle install ---> Running in 65a2592eca90 Fetching gem metadata from https://rubygems.org/............ Fetching rake 13.0.3 Installing rake 13.0.3 ## part ommited Removing intermediate container 65a2592eca90 ---> 55d9368c4b98 Step 6/6 : CMD bundle exec rails s -p 3000 -b '0.0.0.0' ---> Running in 795356f8553e Removing intermediate container 795356f8553e ---> 2466c41ac676 Successfully built 2466c41ac676 Successfully tagged rails_app:latest

  • hub-feedback

    Feedback and bug reports for the Docker Hub

  • version: "3" services: database: # Official postgres image available in https://hub.docker.com/ image: postgres # There are many types of volumes, this is a named volume, which will store database in docker directory # Named volumes must be listed under the top-level volumes key, as shown at bottom of the file volumes: - db_data:/var/lib/postgresql/data environment: - POSTGRES_PASSWORD=password web: image: rails_app # Command will replace CMD from Dockerfile command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'" # Path on the host, relative to the Compose file. 'app' is a WORKDIR name from Dockerfile # This volume will allow you to run the Rails app with Docker Compose # and made live changes without rebuilding the image volumes: - .:/app ports: - "3001:3000" # 'database' is Postgres service name from the top of the file - it will allow communication between containers depends_on: - database environment: - POSTGRES_PASSWORD=password - POSTGRES_USERNAME=postgres - POSTGRES_HOST=database # it's Postgres service name from the top of the file volumes: db_data:

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Easiest solution for local deployment?

    5 projects | /r/docker | 18 Sep 2022
  • Add https to docker app

    2 projects | /r/docker | 24 Jun 2023
  • Beginner questions about deploying node.js app on Beanstalk

    2 projects | /r/aws | 19 May 2023
  • Further investigating 403 – access forbidden by rule

    2 projects | /r/nginx | 20 Mar 2023
  • What is the correct way to have my webapp in one container and the webserver in another?

    2 projects | /r/docker | 8 Mar 2023