-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
134 lines (123 loc) · 3.43 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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
version: '3.4'
services:
rails: &rails
image: ghcr.io/scout-ch/midata-cypress/rails:latest
restart: always
build:
context: docker
command: [ "puma", "-e", "test", "-t", "0:1", "-p", "3000" ]
user: "${RAILS_UID:-1000}"
tty: true
stdin_open: true
depends_on:
- db
- mailcatcher
- cache
- webpack
env_file: ./development/docker/rails.env
environment:
WEBPACKER_DEV_SERVER_HOST: webpack
ports:
- "3000:3000"
volumes:
- ./development/app/:/usr/src/app
- hitobito_bundle:/opt/bundle
- seed:/seed
- ./development/docker/home/rails:/home/developer
- /tmp/.X11-unix:/tmp/.X11-unix
- ./cypress/app_commands:/usr/src/app/hitobito/spec/cypress/app_commands
- ./cypress/cypress_helper.rb:/usr/src/app/hitobito/spec/cypress/cypress_helper.rb
- ./docker/cypress/config/initializers/cypress_on_rails.rb:/usr/src/app/hitobito/config/initializers/cypress_on_rails.rb
worker:
<<: *rails
command: [ 'rails', 'jobs:work' ]
ports: []
entrypoint: ["rails-entrypoint"]
environment:
SKIP_RAILS_MIGRATIONS: 1
SKIP_SEEDS: 1
depends_on:
- rails
- db
- mailcatcher
- cache
- webpack
cypress: &cypress
image: cypress/included:8.7.0
working_dir: /e2e
environment:
- CYPRESS_BASE_URL=${CYPRESS_BASE_URL:-http://rails:3000}
volumes:
- ./cypress:/e2e/cypress
- ./cypress.json:/e2e/cypress.json
- ./docker/cypress/entrypoint:/bin/entrypoint
- /tmp/.X11-unix:/tmp/.X11-unix:rw # For running in Docker on Linux
depends_on:
- rails
- worker
entrypoint:
- /bin/entrypoint
command: ["run", "--project", "."]
cypress-gui:
<<: *cypress
command: ["open", "--project", "."]
environment:
- DISPLAY
- CYPRESS_BASE_URL=${CYPRESS_BASE_URL:-http://rails:3000}
# Dependencies
mailcatcher:
image: mailhog/mailhog
restart: always
ports:
- "1080:8025"
cache:
image: memcached:1.6-alpine
restart: always
command: [ memcached, -l, '0.0.0.0', -p, '11211' ]
sphinx:
image: macbre/sphinxsearch:3.1.1
command: sphinx-start
restart: always
depends_on:
- db
volumes:
- ./development/docker/sphinx.conf:/opt/sphinx/conf/sphinx.conf:ro
- ./development/docker/sphinx-start:/usr/local/bin/sphinx-start:ro
- ./development/docker/sphinx-indexer:/usr/local/bin/sphinx-indexer:ro
- sphinx_indexes:/opt/sphinx/indexes
db:
image: mysql:5.7
restart: always
command:
- --sort_buffer_size=2M
env_file: ./development/docker/mysql.env
ports:
- "33066:3306"
volumes:
- ./development/docker/mysql-setup.sql:/docker-entrypoint-initdb.d/mysql-setup.sql:ro
- db:/var/lib/mysql
webpack:
image: ghcr.io/scout-ch/midata-cypress/rails:latest
build:
context: docker
entrypoint: [ "webpack-entrypoint" ]
restart: always
env_file: ./development/docker/rails.env
environment:
WEBPACKER_DEV_SERVER_HOST: webpack
user: "${RAILS_UID:-1000}"
command: /usr/src/app/hitobito/bin/webpack-dev-server
ports:
- "3035:3035"
volumes:
- ./development/app/:/usr/src/app
- hitobito_bundle:/opt/bundle
- hitobito_yarn_cache:/home/developer/.cache/yarn
volumes:
db:
seed:
hitobito_bundle:
external: true
hitobito_yarn_cache:
external: true
sphinx_indexes: