33 lines
869 B
YAML
33 lines
869 B
YAML
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 &&
|
|
yarn test --ci --collectCoverage=true"
|
|
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
|