Skip to content

Instantly share code, notes, and snippets.

@braidn
Created August 5, 2020 19:46
Show Gist options
  • Save braidn/97023a683942d1502b6177d516390231 to your computer and use it in GitHub Desktop.
Save braidn/97023a683942d1502b6177d516390231 to your computer and use it in GitHub Desktop.
Docker Compose for Rails Systems Tests
version: '3'
services:
chromedriver:
image: selenium/standalone-chrome-debug
ports:
- 5900:5900
container_name: chrome_driver
environment:
VNC_NO_PASSWORD: 1
networks:
app_net:
aliases:
- chrome
test:
image: app:latest
command: bundle exec puma -b 'tcp://0.0.0.0:3034' #bundle exec rake test
container_name: test_app
ports:
- 3034:3034
volumes:
- .:/app
- bundle_cache:/src/bundle
- npm_cache:/src/node_modules
tty: true
stdin_open: true
env_file:
- .env
environment:
DATABASE_URL: postgres://postgres@db:5432/test_app
RACK_ENV: test
depends_on:
- db
- chromedriver
networks:
app_net:
aliases:
- test_app
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment