-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
48 lines (44 loc) · 1.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
version: '3.6'
services:
web:
build:
context: .
args:
- NODE_VER=${NODE_VER:-lts}
volumes:
- ./:/app
working_dir: /app
command: sh -c "yarn install && bundle exec rake db:create && bundle exec rake db:migrate && bundle exec rake db:seed && bundle exec rake assets:precompile && rm -f tmp/pids/server.pid && bundle exec 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=--openssl-legacy-provider
- SELENIUM_SERVER=chrome-server
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-server:
image: selenium/standalone-chrome:96.0
ports:
- ${VNC_HTTP:-7904}:7900