Skip to content

Commit

Permalink
Add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
flenny committed Nov 15, 2024
1 parent ebbd3d9 commit c8b7f22
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/extern-sync/README.md
Original file line number Diff line number Diff line change
@@ -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
```

0 comments on commit c8b7f22

Please sign in to comment.