version: '3'
volumes:
postgres:
redis:
bundle:
packs:
node_modules:
services:
server: &server
build:
context: .
dockerfile: ./docker/Dockerfile
args:
BUNDLE_WITHOUT: ''
RAILS_ENV: 'development'
RAILS_SERVE_STATIC_FILES: 'false'
- ./:/app:cached
- bundle:/bundle:delegated
- packs:/app/public/packs
- node_modules:/app/node_modules
links:
- postgres
- redis
ports:
- '3000:3000'
environment:
- REDIS_URL=redis://redis:6379
- POSTGRES_HOST=postgres
- RAILS_ENV=development
- WEBPACKER_DEV_SERVER_HOST=webpacker
command: ["bundle", "exec", "rails", "s", "-p", "3000", "-b", "0.0.0.0"]
webpacker:
<<: *server
command: ./bin/webpack-dev-server
depends_on:
- "server"
- '3035:3035'
- .:/app:cached
- bundle:/bundle
- "NODE_ENV=development"
- "RAILS_ENV=development"
- "WEBPACKER_DEV_SERVER_HOST=0.0.0.0"
image: postgres:9.6
restart: always
- '5432:5432'
- postgres:/data/postgres
- POSTGRES_DB=chatwoot
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=
image: redis:alpine
- redis:/data/redis
- '6379:6379'