-
-
Notifications
You must be signed in to change notification settings - Fork 81
Expand file tree
/
Copy pathdocker-compose.override.yml-example
More file actions
68 lines (61 loc) · 1.93 KB
/
Copy pathdocker-compose.override.yml-example
File metadata and controls
68 lines (61 loc) · 1.93 KB
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
# NOTE - copy to docker-compose.override.yml if you want
# fixed rather than random ports on the host for services below
# or to override other configuration
# Copy the ruby-service definition from docker-compose.yml
x-ruby-service: &ruby-service
build:
context: .
args:
UID: ${UID:-1000}
GID: ${GID:-1000}
DOCKER_GID: ${DOCKER_GID:-999}
# Sorbet doesn't currently build for Linux ARM64 (see https://github.com/sorbet/sorbet/issues/4119)
# So, we're forced to build the container as linux/amd64 always and lean on Rosetta
# on Apple silicon for running this.
# Important: if you're on Apple Silicon ensure that "Use Rosetta for x86/amd64 emulation on Apple Silicon"
# is switched on in Docker Desktop.
platform: linux/amd64
volumes:
- .:/app
- gem_cache:/usr/local/bundle/gems
- /var/run/docker.sock:/var/run/docker.sock
environment:
DISABLE_SPRING: "1"
ELASTICSEARCH_URL: "http://elasticsearch:9288"
# FIXME: Pass url for mitmdump2
MYSQL_HOST: "mysql"
MYSQL_USER: "root"
REDIS_URL: "redis://redis:6379"
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:?MYSQL_ROOT_PASSWORD must be set, preferably in the .env file}
# And now override things...
services:
web:
ports:
- "3001:3000" # Example: override if 3000 conflicts
mysql:
ports:
- "3307:3306"
redis:
ports:
- "16379:6379"
mitmdump2:
ports:
- "8008:8080"
# Add this if you like guard - auto runs tests and live reload when pages change
guard:
<<: *ruby-service
ports:
- "35729:35729" # LiveReload port
# too many conflicts with spring - disabling it for guard!
environment:
- DISABLE_SPRING=1
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_healthy
web:
condition: service_started # avoid race condition on bundle install
command: bundle exec guard
tty: true
stdin_open: true