Advertisement
HarshBarash

docker-compose.yml

Mar 21st, 2022
1,232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.95 KB | None | 0 0
  1. version: '3.4'
  2.  
  3. services:
  4.   app:
  5.     build:
  6.       context: .
  7.       dockerfile: Dockerfile
  8.     depends_on:
  9.       - database
  10.       - redis
  11.     ports:
  12.       - "3000:3000"
  13.     volumes:
  14.       - .:/app
  15.       - gem_cache:/usr/local/bundle/gems
  16.       - node_modules:/app/node_modules
  17.     env_file: .env
  18.     environment:
  19.       RAILS_ENV: development
  20.  
  21.   database:
  22.     image: postgres:12.1
  23.     volumes:
  24.       - db_data:/var/lib/postgresql/data
  25.       - ./init.sql:/docker-entrypoint-initdb.d/init.sql
  26.  
  27.   redis:
  28.     image: redis:5.0.7
  29.  
  30.   sidekiq:
  31.     build:
  32.       context: .
  33.       dockerfile: Dockerfile
  34.     depends_on:
  35.       - app
  36.       - database
  37.       - redis
  38.     volumes:
  39.       - .:/app
  40.       - gem_cache:/usr/local/bundle/gems
  41.       - node_modules:/app/node_modules
  42.     env_file: .env
  43.     environment:
  44.       RAILS_ENV: development
  45.     entrypoint: ./entrypoints/sidekiq-entrypoint.sh
  46.  
  47. volumes:
  48.   gem_cache:
  49.   db_data:
  50.   node_modules:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement