-
Notifications
You must be signed in to change notification settings - Fork 27
/
docker-compose.yaml
89 lines (89 loc) · 2.15 KB
/
docker-compose.yaml
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
# To start all docker containers run: `docker-compose up`
#
version: '3.8'
services:
app:
build:
context: .
# To debug Github Actions CI issues:
# 1) Replace `target: develop` with `dockerfile: Dockerfile.github-actions`,
# 2) Update the `command:` (for example `command: bash -c "cd app && bundle install && bundle exec rake teaspoon"`)
# 3) Run `docker compose build app`.
# 4) Re-run as needed ot attach to the container to run other debugging commands
target: develop
command: bash -c "bundle install && bundle exec rails s -p 3000 -b '0.0.0.0'"
ports:
- "3000:3000"
- "4000:4000"
depends_on:
- db
- selenium
volumes:
- .:/app
- gem_cache:/gems
environment:
- MYSQL_HOST=db
- MYSQL_USER=root
- MYSQL_PASSWORD=root
- SMTP_HOST=mailcatcher
- SELENIUM_HOST=selenium
- SELENIUM_PORT=4444
- TEST_APP_PORT=3000
- DOCKER_LOCAL_DEV=true
# Uncomment below to run teaspoon tests
# - RAILS_ENV=test
# - TEASPOON_RAILS_ENV=test
tty: true
stdin_open: true
delayed_job:
build:
context: .
target: develop
command: bundle exec rake jobs:work
depends_on:
- app
volumes:
- .:/app
- gem_cache:/gems
environment:
- MYSQL_HOST=db
- MYSQL_USER=root
- MYSQL_PASSWORD=root
- SMTP_HOST=mailcatcher
stdin_open: true
tty: true
db:
image: mysql:8
environment:
- MYSQL_ROOT_PASSWORD=root
ports:
- "3306:3306"
volumes:
- db-data:/var/lib/mysql
tty: true
stdin_open: true
logging:
driver: none
mailcatcher:
build:
context: .
target: develop
command: bash -c "gem install mailcatcher && mailcatcher --ip 0.0.0.0 --no-quit -f"
ports:
- "1080:1080"
volumes:
- .:/app
- gem_cache:/gems
tty: true
stdin_open: true
# For system-tests and teaspoon
selenium:
image: selenium/standalone-chrome:120.0.6099.109-chromedriver-120.0.6099.109
logging:
driver: none
ports:
- "5900:5900"
volumes:
db-data:
driver: local
gem_cache: {}