diff --git a/README.md b/README.md index 5d54171..dd31333 100644 --- a/README.md +++ b/README.md @@ -51,3 +51,11 @@ You can configure the app at runtime using variables (see `docker-compose.yml`). * SHORT_TIME_FORMAT * DATETIME_FORMAT * SHORT_DATETIME_FORMAT + +## Tests + +To run the bundled test, use the `docker-compose.test.yml` file. + +``` +# docker-compose -f docker-compose.test.yml run --rm app +``` diff --git a/docker-compose.test.yml b/docker-compose.test.yml new file mode 100644 index 0000000..c2b7508 --- /dev/null +++ b/docker-compose.test.yml @@ -0,0 +1,25 @@ +version: '3' +services: + app: + build: + context: . + args: + - BRANCH=${BRANCH-master} + image: ninech/netbox:${BRANCH-latest} + depends_on: + - postgres + env_file: netbox.env + command: + - ./manage.py + - test + postgres: + image: postgres:9.6-alpine + environment: + POSTGRES_USER: netbox + POSTGRES_PASSWORD: J5brHrAXFLQSif0K + POSTGRES_DB: netbox +volumes: + netbox-static-files: + driver: local + netbox-nginx-config: + driver: local