-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
111 lines (100 loc) · 2.38 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
version: '3.4'
x-app: &app_base
image: ${IMAGE_NAME}
environment:
- RAILS_ENV=development
- JWT_SECRET_TOKEN
build:
context: .
dockerfile: Dockerfile
args:
- BUNDLE_WITHOUT="${BUNDLE_WITHOUT}"
- BUNDLER_VERSION=2.3.10
- FOLDERS_TO_REMOVE=""
depends_on:
- database
- elasticsearch
- redis
links:
- database
- elasticsearch
volumes:
- ruby_bundle:/usr/local/bundle
services:
app:
<<: *app_base
stdin_open: true
tty: true
ports:
- "3000:3000"
volumes:
- .:/app
- ./docker/database.yml:/app/config/database.yml
env_file: .env.docker
environment:
- JWT_SECRET_TOKEN
- PASSWORD_RECOVERY_LINK_TEMPLATE
- MAILER_SENDER_ADDRESS
entrypoint: ./bin/entrypoints/docker-entrypoint $RAILS_ENV
nginx:
restart: unless-stopped
build:
context: ./docker
dockerfile: nginx.Dockerfile
depends_on:
- app
ports:
- "80:80"
database:
image: postgres:12.1
ports:
- '5432:5432'
command: postgres -c shared_preload_libraries=pg_stat_statements -c pg_stat_statements.track=all -c pg_stat_statements.max=10000 -c track_activity_query_size=2048
volumes:
- db_data:/var/lib/postgresql/data
- ./bin/docker-init.sql:/docker-entrypoint-initdb.d/init.sql
- ./bin/pghero-permissions.sql:/docker-entrypoint-initdb.d/pghero-permissions.sql
redis:
image: redis:6.2.6
ports:
- '6379:6379'
volumes:
- redis:/data
sysctls:
- net.core.somaxconn=511
sidekiq:
<<: *app_base
depends_on:
- app
volumes:
- .:/app
- ./docker/database.yml:/app/config/database.yml
env_file: .env.docker
environment:
- REDIS_URL=redis://redis:6379/1
entrypoint: ./bin/entrypoints/sidekiq-entrypoint
elasticsearch:
image: elasticsearch:8.3.2
environment:
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms1g -Xmx3g"
- xpack.security.enabled=false
- discovery.type=single-node
- http.cors.allow-origin="/.*/"
- http.cors.enabled=true
env_file: .env.docker
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- elasticsearch:/usr/share/elasticsearch/data
ports:
- "9200:9200"
- "9300:9300"
volumes:
ruby_bundle:
db_data:
redis:
elasticsearch: