Giter Site home page Giter Site logo

Comments (5)

durierem avatar durierem commented on August 10, 2024 7

Setting up Rails for the first time with all the dependencies necessary can be daunting for beginners.

The README outlines that docked is intended for beginners and as such I think it should stick to default options and dependencies that you get when running rails new.

Providing a dockerised Rails development environment that covers most cases and fits everyone's needs is nearly impossible without sacrificing this simplicity.

from docked.

ginzunza avatar ginzunza commented on August 10, 2024 3

I believe you have to use docker-compose for that necessity. This is an example:

version: '3.4'
services:
  web:
    image: "ghcr.io/rails/cli:latest"
    command: /bin/bash -c "rm -f /tmp/server.pid && bundle exec rails server -b 0.0.0.0 -P /tmp/server.pid"
    env_file: .env
    ports:
      - 3000:3000
    depends_on:
      - db
      - redis
    volumes:
      - .:/rails
      - ruby-bundle-cache:/bundle
    tty: true
    stdin_open: true

  redis:
    image: "redis:7-alpine"
    ports:
      - 6379
    volumes:
    - ./tmp/redis_data:/var/lib/redis/data

  db:
    image: postgres
    restart: always
    ports:
      - 5432:5432
    volumes:
      - ./tmp/postgres_data:/var/lib/postgresql/data

volumes:
  ruby-bundle-cache:
    external: true

This is a post with the entire explanation.

from docked.

yorsant avatar yorsant commented on August 10, 2024 2

It would be nice to add some instructions to the readme.

from docked.

ginzunza avatar ginzunza commented on August 10, 2024 1

Hi, @yorsant if you have any additional questions let me know. Regarding the instructions, if you are at the root of your rails project you have to create a file called docker-compose.yml with the information above. After that, you have to execute the following command to start rails: docker-compose up. Don't forget to add a .env file with the Redis and Postgres credentials.

from docked.

dhh avatar dhh commented on August 10, 2024

What @durierem said.

from docked.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.