From dea446c78469c44ed18336e9e5652d6f7aa8653b Mon Sep 17 00:00:00 2001 From: Oliver Gut Date: Fri, 15 Nov 2024 10:02:40 +0100 Subject: [PATCH] Add basic documentation --- src/extern-sync/README.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/extern-sync/README.md diff --git a/src/extern-sync/README.md b/src/extern-sync/README.md new file mode 100644 index 000000000..d18accf1e --- /dev/null +++ b/src/extern-sync/README.md @@ -0,0 +1,30 @@ +# Extern-Sync + +## ๐ŸŽฏ Purpose + +*Extern-Sync* is a .NET application to sync selected drilling data between a source and a target database. It consists of a couple of *sync tasks* that are executed in sequence. + +The application is packed into a Docker container and can be run in a containerized environment. The container exits with a non-zero exit code if any of the *sync tasks* fails. + +## ๐Ÿ› ๏ธ Configuration + +The application is configured using environment variables. The following environment variables are mandatory: + +- `CONNECTIONSTRINGS__SourceBdmsContext`: The connection string to the source database. +- `CONNECTIONSTRINGS__TargetBdmsContext`: The connection string to the target database. + +## ๐Ÿงช Unit Tests + +According to your needs, *sync tasks* can either be executed in a *in-memory* or a real PostgreSQL database using [Testcontainers](https://testcontainers.com/modules/postgresql/). + +## ๐Ÿš€ Usage + +A full integration test can be run by executing the following commands: + +```bash +# Setup environment (source and target databases) +docker compose -f docker-compose.services.yml up --wait + +# Start the extern-sync container +docker compose down && docker compose up --build +```