Docker development setup

Public
Docker-Compose file to get started with Postgresql and Redis
Icons/chart bar
Used 11 times
Created by
J Julian Rubisch

Usage

Run this command in your Rails app directory in the terminal:

rails app:template LOCATION="https://railsbytes.com/script/VD7spG"
Template Source

Review the code before running this template on your machine.

file 'docker/docker-compose.dev.yml', <<~CODE
version: '3.8'
services:
  db:
    image: postgres:latest
    environment:
      - POSTGRES_PASSWORD=password
    ports:
      - "5432:5432"
    volumes:
      - "dbdata:/var/lib/postgresql/data"
  redis:
    image: redis:alpine
    ports:
      - "6379:6379"

volumes:
  dbdata:
CODE
Comments

Sign up or Login to leave a comment.