-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
67 lines (60 loc) · 1.46 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
services:
web:
build: .
ports:
- "3000:3000"
volumes:
- .:/usr/src/app
- gem_cache:/gems
depends_on:
- mariadb-dev
- mariadb-test
command: bash -c "rm -f /usr/src/app/tmp/pids/server.pid && bin/init_dev_db.sh && bundle exec rails s -b 0.0.0.0"
test:
build: .
volumes:
- .:/usr/src/app
- gem_cache:/gems
depends_on:
- mariadb-test
command: bash -c "bin/wait-for mariadb-test:3306 && bundle exec rake test"
deploy:
restart_policy:
condition: none
system-test:
build: .
volumes:
- .:/usr/src/app
- gem_cache:/gems
depends_on:
- mariadb-test
- chrome-server
command: bash -c "bin/wait-for mariadb-test:3306 && bin/run_system_tests.sh"
deploy:
restart_policy:
condition: none
mariadb-dev:
image: mariadb
restart: always
environment:
MYSQL_ROOT_PASSWORD: mysqlroot
MYSQL_DATABASE: ht_repository
MYSQL_USER: otis
MYSQL_PASSWORD: otis
volumes:
- ./db/ht_web.sql:/docker-entrypoint-initdb.d/ht_web.sql
mariadb-test:
image: mariadb
restart: always
environment:
MYSQL_ROOT_PASSWORD: mysqlroot
MYSQL_DATABASE: ht_repository
MYSQL_USER: otis
MYSQL_PASSWORD: otis
volumes:
- ./db/ht_web.sql:/docker-entrypoint-initdb.d/ht_web.sql
chrome-server:
image: selenium/standalone-chrome:latest
restart: always
volumes:
gem_cache: