diff --git a/.gitignore b/.gitignore index e6f1077..8fd25d2 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ venv build/* dist/* logs/* +configs/integrationtest-datacenter/* .python-version .mypy_cache __pycache__/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6fdc94f..f278bb8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -81,6 +81,8 @@ Simply run the following to spin the above up and drop yourself into your contai _Note_: the DC and DB for the above environment are [here](https://github.com/Autodesk/pgbelt/blob/main/tests/integration/conftest.py#L20-L21). +Note: your local code will be _mounted_ to your container instead of copied. This allows you to edit your code on your laptop, then go into the container and run `pip3 install -e .` to update your container's `belt` binary for quick testing iterations. + Once you are done, you can exit out of the above container. Then, for cleanliness, please run the following to clean up `docker` and `docker-compose`: make clean-docker diff --git a/docker-compose.yml b/docker-compose.yml index 6845e81..531d90a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -82,7 +82,7 @@ services: TEST_PG_DST_PORT: 5432 TEST_PG_DST_ROOT_USERNAME: postgres TEST_PG_DST_ROOT_PASSWORD: postgres - command: bash -c "poetry run python3 tests/integration/conftest.py && pip3 install -e . && bash" + command: bash -c "cd /pgbelt-volume/ && poetry run python3 tests/integration/conftest.py && pip3 install -e . && bash" depends_on: db-src: condition: service_healthy @@ -90,6 +90,8 @@ services: condition: service_healthy networks: - datacenter + volumes: + - ./:/pgbelt-volume/:rw networks: datacenter: