-
Notifications
You must be signed in to change notification settings - Fork 499
/
docker-compose.yml
118 lines (117 loc) · 2.93 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
112
113
114
115
116
117
118
# 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:5
ports:
- "6379:6379"
volumes:
- redis-data:/var/lib/redis:rw
es:
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.5
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:
- RAILS_ENV=development
- GITPOD_WORKSPACE_ID=${GITPOD_WORKSPACE_ID:-}
- GITPOD_WORKSPACE_CLUSTER_HOST=${GITPOD_WORKSPACE_CLUSTER_HOST:-}
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
# Make `docker compose attach web` work for debugging
stdin_open: true
tty: true
chrome:
profiles:
- test
image: selenium/standalone-chromium
ports:
- "4444:4444"
test:
profiles:
- test
build:
context: .
dockerfile: ./config/docker/Dockerfile
environment:
- RAILS_ENV=test
- CHROME_URL=http://chrome:4444
- DOCKER=true
- CAPYBARA_PORT=5100
command: bundle exec cucumber
volumes:
- .:/otwa
ports:
- "5100:5100"
depends_on:
- db
- redis
- es
- mc
- chrome