# Importing test database from an npm module when using docker container

**URL:** <https://discuss.circleci.com/t/importing-test-database-from-an-npm-module-when-using-docker-container/13237>\
**Category:** Databases\
**Tags:** nodejs, docker, circle-yml\
**Created:** [June 9, 2017, 8:50am UTC](https://discuss.circleci.com/t/importing-test-database-from-an-npm-module-when-using-docker-container/13237 "2017-06-09T08:50:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![maephisto](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/maephisto/32/18951_2.png) [@maephisto](https://discuss.circleci.com/u/maephisto)\
**Post date:** [June 9, 2017, 8:50am UTC](https://discuss.circleci.com/t/importing-test-database-from-an-npm-module-when-using-docker-container/13237/1 "2017-06-09T08:50:40Z")

</div>

Hey there!  
I want to setup a test database that I would be using while running integration tests on Circle CI. I am using docker containers.  
Right now, I’m using the recommended way (import a sql file to the `circle_test` database and everything works):

```auto
database:
  override:
    - mysql -u ubuntu circle_test < test/data/test-database.sql

```

But now I’d like instead of that, to use `db-migrate` module from NPM. I have my config in place but it looks like the command is run from outside the container or smth like this, because the modules are not found

```auto
database:
  override:
    - ./node_modules/db-migrate/bin/db-migrate .......

```

All i get is not found error.  
Could you maybe advise how can i overcome this issue and be able to use `db-migrate` ?  
Thank you!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [June 18, 2018, 11:41am UTC](https://discuss.circleci.com/t/importing-test-database-from-an-npm-module-when-using-docker-container/13237/2 "2018-06-18T11:41:48Z")

</div>

Closed on June 18, 2018, 11:41am UTC


