docker-compose.yml
version: "3"
services:
db:
image: postgres
environment:
POSTGRES_DB: hunterskeepers_development
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
volumes:
- data:/var/lib/postgresql/data
ports:
- "5432"
webpacker:
build:
context: .
target: rails-builder
environment:
- NODE_ENV=development
- RAILS_ENV=development
- WEBPACKER_DEV_SERVER_HOST=0.0.0.0
command: ./bin/webpack-dev-server
volumes:
- ./:/app/
ports:
- "3035:3035"
web:
build:
context: .
target: rails-builder
depends_on:
- chrome
- db
- webpacker
command: sh -c "
bundle exec rake db:migrate db:seed
&& rm -f tmp/pids/server.pid
&& bundle exec rails s -p 3000 -b '0.0.0.0'
"
container_name: "hunterskeepers_web"
ports:
- "3000:3000"
volumes:
- "./:/app/"
environment:
- WEBPACKER_DEV_SERVER_HOST=webpacker
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=password
- DB_HOST=db
- HUB_URL=http://chrome:4444/wd/hub
chrome:
image: selenium/standalone-chrome:3.141.59-zirconium # this version should match that of the selenium-webdriver gem (see Gemfile)
volumes:
- /dev/shm:/dev/shm
volumes:
# Volume to hold the Postgres database on the host system
data: