-
Notifications
You must be signed in to change notification settings - Fork 15
/
docker-compose.yml
133 lines (125 loc) · 3.21 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
services:
rails: &rails
build:
context: ./docker
dockerfile: rails.dockerfile
image: ghcr.io/hitobito/development/rails
user: "${RAILS_UID:-1000}"
tty: true
stdin_open: true
depends_on:
- db
- mailcatcher
- cache
- webpack
env_file: docker/rails.env
environment:
WEBPACKER_DEV_SERVER_HOST: webpack
DISABLE_SPRING: 'true'
ports:
- "3000:3000"
volumes:
- ./app/:/usr/src/app
- hitobito_bundle:/opt/bundle
- seed:/seed
- ./docker/home/rails:/home/developer
- /tmp/.X11-unix:/tmp/.X11-unix
- ./docker/rails/work_around_docker_fs_bug.rb:/usr/src/app/hitobito/config/initializers/work_around_docker_fs_bug.rb:ro
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
# `exec` into this to execute the tests of the core
rails_test_core:
<<: *rails
command: [ 'sleep', 'infinity' ]
ports: []
environment:
WAGONS: ''
RAILS_ENV: test
RAILS_TEST_DB_NAME: "hitobito_test_core"
WEBPACKER_DEV_SERVER_HOST: null
RAILS_SPHINX_HOST: null
SKIP_SEEDS: 1
SKIP_BUNDLE_INSTALL: 1
depends_on:
- db
worker:
<<: *rails
command: [ 'rails', 'jobs:work' ]
ports: []
environment:
SKIP_RAILS_MIGRATIONS: 1
SKIP_SEEDS: 1
SKIP_BUNDLE_INSTALL: 1
depends_on:
- rails
- db
- mailcatcher
- cache
# Dependencies
mailcatcher:
image: ghcr.io/hitobito/development/mailcatcher
build:
context: ./docker
dockerfile: mailcatcher.dockerfile
ports:
- "1080:1080"
cache:
image: memcached:1.6-alpine
command: [ memcached, -l, '0.0.0.0', -p, '11211' ]
sphinx:
image: macbre/sphinxsearch:3.1.1
command: sphinx-start
depends_on:
- db
volumes:
- ./docker/sphinx.conf:/opt/sphinx/conf/sphinx.conf:ro
- ./docker/sphinx-start:/usr/local/bin/sphinx-start:ro
- ./docker/sphinx-indexer:/usr/local/bin/sphinx-indexer:ro
- sphinx_indexes:/opt/sphinx/indexes
profiles: [sphinx]
db:
image: mysql:5.7
command:
- --sort_buffer_size=2M
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_general_ci
- --innodb-lock-wait-timeout=2
- --max_allowed_packet=3250585600
env_file: ./docker/mysql.env
ports:
- "33066:3306"
ulimits:
nproc: 65535
nofile:
soft: 20000
hard: 40000
volumes:
- ./docker/mysql-setup.sql:/docker-entrypoint-initdb.d/mysql-setup.sql:ro
- ./docker/test-setup.sql:/docker-entrypoint-initdb.d/test-setup.sql:ro
- db:/var/lib/mysql
webpack:
build:
context: ./docker
dockerfile: rails.dockerfile
image: ghcr.io/hitobito/development/rails
entrypoint: [ "webpack-entrypoint.sh" ]
env_file: docker/rails.env
environment:
WEBPACKER_DEV_SERVER_HOST: webpack
SKIP_BUNDLE_INSTALL: 1
user: "${RAILS_UID:-1000}"
command: /usr/src/app/hitobito/bin/webpack-dev-server
ports:
- "3035:3035"
volumes:
- ./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: