-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
53 lines (49 loc) · 1.65 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
services:
web:
build:
context: .
args:
- NODE_VER=${NODE_VER:-lts}
volumes:
- ./:/app
working_dir: /app
command: sh -c "if [ ! -f Gemfile ]; then gem install rails -v '~> ${RAILS_VERSION:-7.0.0}' ; rails new . -f -G -d mysql ; bundle add sqlite3 --group test ; fi ; bundle install ; rails db:prepare ; rails assets:precompile ; rm -f tmp/pids/server.pid ; rails server -b '0.0.0.0' "
ports:
- ${PORT:-4004}:${PORT:-4004}
depends_on:
db:
condition: service_healthy
environment:
- PORT=${PORT:-4004}
- RAILS_ENV=${RAILS_ENV:-development}
- SECRET_KEY_BASE=${SECRET_KEY_BASE}
- DATABASE_URL=mysql2://root:mypasswd@db/${COMPOSE_PROJECT_NAME}_${RAILS_ENV:-development}
- TEST_DATABASE_URL=sqlite3:db/test.sqlite3
- RAILS_SERVE_STATIC_FILES=true
- NODE_OPTIONS=${NODE_OPTIONS}
- SELENIUM_REMOTE_URL=http://chrome:4444
- ELASTIC_SEARCH_URL=http://elasticsearch:9200
env_file:
- path: ./override.env
required: false
db:
image: mysql
command: --sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
environment:
MYSQL_ROOT_HOST: "%"
MYSQL_ROOT_PASSWORD: mypasswd
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
mail:
image: dockage/mailcatcher
ports:
- ${MAILCATCHER_HTTP:-4084}:1080
chrome:
image: selenium/standalone-chrome:nightly
ports:
- ${VNC_HTTP:-7904}:7900
elasticsearch:
image: elasticsearch:8.16.1
environment:
- discovery.type=single-node
- xpack.security.enabled=false