-
-
Notifications
You must be signed in to change notification settings - Fork 542
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
75 lines (72 loc) · 2.54 KB
/
Copy pathdocker-compose.yml
File metadata and controls
75 lines (72 loc) · 2.54 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
services:
web:
build: .
command: bin/dev
ports:
- "3000:3000"
- "4000:4000"
volumes:
- .:/usr/src/app
- node_modules:/usr/src/app/node_modules
- bundle_data:/usr/local/bundle/gems
env_file:
- config/docker.env
# `condition: service_healthy`, not a bare `- database`: a bare depends_on
# waits for the container to START, not for Postgres to accept connections,
# and the docker CI job runs `db:setup` through `compose exec` the moment
# `up -d` returns -- so it raced the database and failed on connection
# refused.
depends_on:
database:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000"]
interval: 30s
timeout: 10s
retries: 5
tty: true
platform: linux/x86_64
database:
# NOTE: Postgres 12 went end-of-life in November 2024, so CI tests against
# an unsupported engine. Bumping it needs the db_data volume recreated, so
# it is a separate decision, not part of unbreaking the job.
image: postgres:12.5
env_file:
- config/docker.env
volumes:
- db_data:/var/lib/postgresql/data
ports:
- "5435:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 12
selenium_chrome:
# `selenium/standalone-chrome-debug` was a SELENIUM 3 image, discontinued in
# 2021. The tag still pulls, so `compose up` succeeds and quietly hands you
# a 2021 Chrome behind the old JSON-wire grid -- while selenium-webdriver
# here is 4.43, which speaks W3C only, so every :js spec in the docker job
# talks past it. `standalone-chromium` is maintained and, unlike
# `standalone-chrome`, publishes arm64 as well as amd64, so it also works on
# Apple silicon.
image: selenium/standalone-chromium:latest
logging:
driver: none
ports:
# noVNC, to watch a spec run (`:debug` driver). The -debug image served
# raw VNC on 5900; the maintained images serve noVNC on 7900 in a browser
# at http://localhost:7900 (password "secret") and keep 5900 for a VNC
# client.
- "7900:7900"
- "5900:5900"
# Chrome needs more than the default 64MB of /dev/shm or tabs crash mid-run.
# The in-container driver already passes --disable-dev-shm-usage; raising
# this is the belt to that braces, as Selenium's own compose examples do.
shm_size: 2gb
volumes:
- ./tmp/downloads:/home/seluser/Downloads
volumes:
db_data:
bundle_data:
node_modules: