62 lines
1.6 KiB
YAML
62 lines
1.6 KiB
YAML
version: "3"
|
|
services:
|
|
web:
|
|
build: .
|
|
ports:
|
|
- "3000:3000"
|
|
depends_on:
|
|
- db
|
|
- redis
|
|
- elasticsearch
|
|
environment:
|
|
RAILS_ENV: development
|
|
DATABASE_URL: postgres://postgres:mysecretpassword@db:5432/postgres
|
|
YARN_INTEGRITY_ENABLED: "false"
|
|
ELASTICSEARCH_URL: http://elasticsearch:9200
|
|
REDIS_URL: redis://redis:6379
|
|
volumes:
|
|
- .:/usr/src/app
|
|
command: bundle exec rails server -b 0.0.0.0 -p 3000
|
|
webpacker:
|
|
build: .
|
|
command: ./bin/webpack-dev-server
|
|
sidekiq:
|
|
build: .
|
|
command: bundle exec sidekiq -c 2
|
|
depends_on:
|
|
- redis
|
|
- db
|
|
- elasticsearch
|
|
environment:
|
|
RAILS_ENV: development
|
|
REDIS_SIDEKIQ_URL: redis://redis:6379
|
|
DATABASE_URL: postgres://postgres:mysecretpassword@db:5432/postgres
|
|
ELASTICSEARCH_URL: http://elasticsearch:9200
|
|
db:
|
|
image: postgres:${POSTGRES_VERSION:-9.6.15-alpine}
|
|
ports:
|
|
- "5432:5432"
|
|
redis:
|
|
image: "redis"
|
|
ports:
|
|
- "6379:6379"
|
|
elasticsearch:
|
|
image: docker.elastic.co/elasticsearch/elasticsearch:7.5.2
|
|
container_name: elasticsearch
|
|
environment:
|
|
- cluster.name=docker-cluster
|
|
- bootstrap.memory_lock=true
|
|
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
|
|
- "discovery.type=single-node"
|
|
- xpack.security.enabled=false
|
|
- xpack.monitoring.enabled=false
|
|
- xpack.graph.enabled=false
|
|
- xpack.watcher.enabled=false
|
|
ulimits:
|
|
memlock:
|
|
soft: -1
|
|
hard: -1
|
|
volumes:
|
|
- ./docker_data/elasticsearch/data:/usr/share/elasticsearch/data
|
|
ports:
|
|
- "9200:9200"
|