-
Notifications
You must be signed in to change notification settings - Fork 764
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
146 lines (145 loc) · 4.02 KB
/
docker-compose.yml
File metadata and controls
146 lines (145 loc) · 4.02 KB
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# To run the Archive in docker for the first time you should run one of the init scripts:
# - linux: `script/docker/init.sh`
# - windows: `script/docker/init.cmd`
#
# This will handle setting up config files, creating databases, and running migrations.
#
# After these oneoff tasks have been performed, you can start the development
# webserver with the command:
#
# ```
# docker compose up -d web
# ```
#
# Once it is running, it will be visible at http://localhost:3000/
#
# To run tests, you should use the test container instead of the web container,
# because it includes a headless chrome container for running JS-based tests.
# You can run tests like this:
#
# ```
# docker compose run --rm test bundle exec cucumber features/other_a/autocomplete.feature
# ```
volumes:
my-datavolume:
redis-data:
esdata1:
services:
db:
image: mariadb:10.5.4-focal
environment:
- MYSQL_ROOT_PASSWORD=change_me
ports:
- "3306:3306"
command:
[
"mysqld",
"--sql-mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION",
]
volumes:
- my-datavolume:/var/lib/mysql:rw
redis:
image: redis:7
ports:
- "6379:6379"
volumes:
- redis-data:/var/lib/redis:rw
es:
image: docker.elastic.co/elasticsearch/elasticsearch:9.3.0
ports:
- "9200:9200"
- "9300:9300"
- "9400:9400"
volumes:
- esdata1:/usr/share/elasticsearch/data:rw
environment:
- transport.host=localhost
- bootstrap.memory_lock=false
- "ES_JAVA_OPTS=-Xms1500m -Xmx1500m"
- discovery.type=single-node
# Silence "security features are not enabled" warnings
# https://github.com/elastic/elasticsearch/issues/78500
- xpack.security.enabled=false
mc:
image: memcached:1.5
ports:
- "11211:11211"
web:
profiles:
- dev
build:
context: .
dockerfile: ./config/docker/Dockerfile
environment: &environment
RAILS_ENV: development
# Disable rack-timeout
RACK_TIMEOUT_SERVICE_TIMEOUT: 0
CODESPACES: ${CODESPACES:-}
CODESPACE_NAME: ${CODESPACE_NAME:-}
GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN: ${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN:-}
ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY: bEZjYLY9tCYGh6WlcMtEJpIi7GO2plZC
ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY: PpLWizzsQHIWnIihtECw8nDHZQd0amzf
ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT: 3S99KdpdEWLnCYudBgUfdCFDBWePWCud
command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
volumes:
- .:/otwa
ports:
- "3000:3000"
depends_on:
- db
- redis
- es
- mc
- resque
# Make `docker compose attach web` work for debugging
stdin_open: true
tty: true
resque:
profiles:
- dev
build:
context: .
dockerfile: ./config/docker/Dockerfile
command: bash -c "bundle exec rake environment resque:scheduler & bundle exec rake environment resque:work"
volumes:
- .:/otwa
environment:
<<: *environment
QUEUE: '*'
depends_on:
- db
- redis
chrome:
profiles:
- test
image: selenium/standalone-chromium
ports:
- "4444:4444"
test:
profiles:
- test
build:
context: .
dockerfile: ./config/docker/Dockerfile
environment:
- RAILS_ENV=test
- ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY=bEZjYLY9tCYGh6WlcMtEJpIi7GO2plZC
- ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY=PpLWizzsQHIWnIihtECw8nDHZQd0amzf
- ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT=3S99KdpdEWLnCYudBgUfdCFDBWePWCud
- CHROME_URL=http://chrome:4444
- DOCKER=true
- CAPYBARA_PORT=5100
- CUCUMBER_PUBLISH_QUIET=true
# Silence ebook-convert warning about running as root
- QTWEBENGINE_CHROMIUM_FLAGS=--no-sandbox
command: sleep infinity
volumes:
- .:/otwa
ports:
- "5100:5100"
depends_on:
- db
- redis
- es
- mc
- chrome