Run acceptance tests via docker compose

This commit is contained in:
James Allen
2017-11-23 16:01:32 +00:00
parent 62de9d8946
commit fbf8cc2d03
10 changed files with 144 additions and 18 deletions

View File

@@ -0,0 +1,42 @@
version: "2"
volumes:
node_modules:
services:
npm:
image: node:6.9.5
volumes:
- .:/app
- node_modules:/app/node_modules
working_dir: /app
test_unit:
image: node:6.9.5
volumes:
- .:/app
- node_modules:/app/node_modules
working_dir: /app
command: npm run test:unit
test_acceptance:
image: node:6.9.5
volumes:
- .:/app
- node_modules:/app/node_modules
environment:
REDIS_HOST: redis
MONGO_HOST: mongo
SHARELATEX_ALLOW_PUBLIC_ACCESS: 'true'
LISTEN_ADDRESS: 0.0.0.0
depends_on:
- redis
- mongo
working_dir: /app
command: npm run start
redis:
image: redis
mongo:
image: mongo:3.4.6