2020-02-11 15:38:28 +01:00
|
|
|
version: "2"
|
|
|
|
|
|
|
|
services:
|
|
|
|
sequelize-middleware:
|
|
|
|
image: "node:latest"
|
|
|
|
user: "node"
|
|
|
|
working_dir: /home/node/app
|
|
|
|
command: >
|
|
|
|
bash -c "yarn install &&
|
|
|
|
./node_modules/.bin/sequelize db:seed:undo:all &&
|
|
|
|
./node_modules/.bin/sequelize db:migrate:undo:all &&
|
|
|
|
./node_modules/.bin/sequelize db:migrate &&
|
|
|
|
./node_modules/.bin/sequelize db:seed:all &&
|
2020-02-11 21:16:25 +01:00
|
|
|
yarn test --ci --coverage"
|
2020-02-11 15:38:28 +01:00
|
|
|
volumes:
|
|
|
|
- ./:/home/node/app
|
|
|
|
- /home/node/node_modules
|
|
|
|
ports:
|
|
|
|
- "3666:4000"
|
|
|
|
depends_on:
|
|
|
|
- sequelize-middleware-db
|
|
|
|
environment:
|
|
|
|
NODE_ENV: "test"
|
|
|
|
sequelize-middleware-db:
|
|
|
|
image: postgres:latest
|
|
|
|
environment:
|
|
|
|
POSTGRES_USER: postgres
|
|
|
|
POSTGRES_PASSWORD: postgres
|
|
|
|
POSTGRES_DB: test
|
|
|
|
sequelize-middleware-adminer:
|
|
|
|
image: adminer
|
|
|
|
ports:
|
|
|
|
- 127.0.0.1:8666:8080
|