-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.spec.yml
32 lines (32 loc) · 1.13 KB
/
docker-compose.spec.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
services:
chrome:
# this version should match that of the selenium-webdriver gem (see Gemfile)
# use this image instead of official Selenium image, because of ARM compatibility
image: seleniarm/standalone-chromium:106.0.5249.119-chromedriver-106.0.5249.119-grid-4.5.0-20221019
db:
environment:
- POSTGRES_PASSWORD=postgres
image: postgres:12.12-alpine3.16
spec:
build: .
# HINT: We have to copy the local .bundle/config to /usr/local/bundle because the behaviour in the container is different
command: zsh -c "mkdir -p -m 0600 ~/.ssh &&
ssh-keyscan github.com >> ~/.ssh/known_hosts && eval $(ssh-agent) &&
ssh-add - <<< \"${SSH_KEY}\" &&
gem update --system --quiet --silent &&
cp ./.bundle/config /usr/local/bundle &&
bundle config &&
bundle install &&
./bin/rails db:reset &&
./bin/rake"
environment:
- RAILS_ENV=test
- DOWNLOADER_DB_HOST=db
- DOWNLOADER_DB_USERNAME=postgres
- DOWNLOADER_DB_PASSWORD=postgres
- HUB_URL=http://chrome:4444/wd/hub
links:
- db
- chrome
volumes:
- ./:/repository-downloader