Skip to content

Commit

Permalink
csv stream (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeknovy authored Apr 13, 2020
1 parent 08e3b42 commit ad05b8c
Show file tree
Hide file tree
Showing 32 changed files with 982 additions and 1,271 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- docker-compose --file docker-compose.testing.yaml up --build -d
script: npm run integration-tests
after_script:
- docker-compose down
- docker-compose --file docker-compose.testing.yaml down

env:
global:
Expand Down
20 changes: 16 additions & 4 deletions docker-compose.testing.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3.6'
services:
db:
image: novyl/jtl-reporter-db:testing
container_name: jtl-reporter-db-test
build:
context: ./src/db/
dockerfile: Dockerfile
Expand All @@ -16,13 +16,25 @@ services:
- "5432:5432"

migration:
image: novyl/jtl-reporter-be:migration
container_name: jtl-reporter-migration
build:
context: ./
dockerfile: Dockerfile
environment:
- WAIT_HOSTS=db:5432
- WAIT_HOSTS=db:5432, mongodb:27017
- DATABASE_URL=postgres://postgres:password@db/jtl_report
- MONGO_CONNECTION_STRING=mongodb://mongodb
command: sh -c "/wait && npm run migrate up"
depends_on:
- db
- db
- mongodb

mongodb:
image: mongo:4.2.5-bionic
container_name: jtl-reporter-mongodb-test
environment:
- MONGO_INITDB_DATABASE=jtl-data
volumes:
- ./src/db/mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
ports:
- "27017:27017"
13 changes: 13 additions & 0 deletions migrations/1585413513843_item-status.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/* eslint-disable camelcase */
exports.up = (pgm) => {
pgm.createType("report_status", ["in_progress", "error", "ready"]);

pgm.addColumn({ schema: "jtl", name: "items" }, {
report_status: {
type: 'report_status',
default: 'ready',
notNull: true
}
});
};

8 changes: 8 additions & 0 deletions migrations/1586344607836_data-id.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
exports.up = (pgm) => {
pgm.addColumn({ schema: "jtl", name: "items" }, {
data_id: {
type: 'uuid',
default: null
}
});
};
Loading

0 comments on commit ad05b8c

Please sign in to comment.