-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
83 lines (75 loc) · 2.06 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
version: '3.6'
volumes:
community-engine-bundler-gems:
community-engine-db-data:
community-engine-elasticsearch:
community-engine-redis:
x-env-info: &env-info
env_file:
- './.env.dev'
x-app-shared: &app-shared
<<: *env-info
image: better-together/community-engine-rails:dev
volumes:
- .:/community-engine
# - ../pundit-resources:/pundit-resources
- community-engine-bundler-gems:/usr/local/bundle/
depends_on:
- db
- redis
services:
app: &app
<<: *app-shared
container_name: community-engine-app
build: # "context" and "dockerfile" fields have to be under "build"
context: .
dockerfile: ./Dockerfile.dev
command: bash -c "rm -f spec/dummy/tmp/pids/server.pid && cd ./spec/dummy && bundle exec rails s -p 3000 -b '0.0.0.0'"
ports:
- "3000:3000"
db:
<<: *env-info
container_name: community-engine-db
image: postgis/postgis:latest
volumes:
- community-engine-db-data:/var/lib/postgresql/data
ports:
- "5440:5432"
env_file:
- './.env.db.dev'
elasticsearch:
container_name: community-engine-elasticsearch
image: elasticsearch:7.17.23
environment:
- node.name=elasticsearch
- cluster.name=community-engine-es
- discovery.seed_hosts=elasticsearch
- discovery.type=single-node
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ports:
- 9201:9200
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- community-engine-elasticsearch:/usr/share/elasticsearch/data
sidekiq:
<<: *app-shared
container_name: community-engine-sidekiq
command: bash -c "rm -f spec/dummy/tmp/pids/server.pid && cd ./spec/dummy && bundle exec sidekiq -C config/sidekiq.yml"
depends_on:
- app
redis:
image: 'redis:7.2-alpine'
container_name: community-engine-redis
command: redis-server
volumes:
- community-engine-redis:/data
mail-server:
image: mailhog/mailhog
container_name: community-engine-smtp
ports:
- '1025:1025'
- '8025:8025'