testcontainers-node
testcontainers-node copied to clipboard
Use memfs for PostgreSQL
By setting this:
PG_DATA: /dev/shm/pgdata/data
We could use memfs, and then speed up the container.
Other options and ideas for the test speed-ups:
- https://marcopeg.com/how-to-run-postgres-for-testing-in-docker/
- https://gajus.com/blog/setting-up-postgre-sql-for-running-integration-tests
I've been running tests for years with these options, without any known side effects:
-c shared_buffers=128MB -c fsync=off -c synchronous_commit=off -c full_page_writes=off
Hi @moltar. Interesting, thanks for the info.
Feel free to raise a PR and if tests pass I don't see any issue in merging.
Should this be a withX helper method you think?