https://github.com/defra/aqie-historicaldata-backend
Git repository for service aqie-historicaldata-backend
https://github.com/defra/aqie-historicaldata-backend
backend cdp dotnet service
Last synced: 19 days ago
JSON representation
Git repository for service aqie-historicaldata-backend
- Host: GitHub
- URL: https://github.com/defra/aqie-historicaldata-backend
- Owner: DEFRA
- License: other
- Created: 2025-02-24T09:44:07.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-24T09:44:23.000Z (over 1 year ago)
- Last Synced: 2025-02-24T10:36:00.308Z (over 1 year ago)
- Topics: backend, cdp, dotnet, service
- Language: C#
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# aqie-historicaldata-backend
Core delivery C# ASP.NET backend template.
* [Install MongoDB](#install-mongodb)
* [Inspect MongoDB](#inspect-mongodb)
* [Testing](#testing)
* [Running](#running)
* [Dependabot](#dependabot)
### Docker Compose
A Docker Compose template is in [compose.yml](compose.yml).
A local environment with:
- Localstack for AWS services (S3, SQS)
- Redis
- MongoDB
- This service.
- A commented out frontend example.
```bash
docker compose up --build -d
```
A more extensive setup is available in [github.com/DEFRA/cdp-local-environment](https://github.com/DEFRA/cdp-local-environment)
### MongoDB
#### MongoDB via Docker
See above.
```
docker compose up -d mongodb
```
#### MongoDB locally
Alternatively install MongoDB locally:
- Install [MongoDB](https://www.mongodb.com/docs/manual/tutorial/#installation) on your local machine
- Start MongoDB:
```bash
sudo mongod --dbpath ~/mongodb-cdp
```
#### MongoDB in CDP environments
In CDP environments a MongoDB instance is already set up
and the credentials exposed as enviromment variables.
### Inspect MongoDB
To inspect the Database and Collections locally:
```bash
mongosh
```
You can use the CDP Terminal to access the environments' MongoDB.
### Testing
Run the tests with:
Tests run by running a full `WebApplication` backed by [Ephemeral MongoDB](https://github.com/asimmon/ephemeral-mongo).
Tests do not use mocking of any sort and read and write from the in-memory database.
```bash
dotnet test
````
### Running
Run CDP-Deployments application:
```bash
dotnet run --project AqieHistoricaldataBackend --launch-profile Development
```
### SonarCloud
Example SonarCloud configuration are available in the GitHub Action workflows.
### Dependabot
We have added an example dependabot configuration file to the repository. You can enable it by renaming
the [.github/example.dependabot.yml](.github/example.dependabot.yml) to `.github/dependabot.yml`
### About the licence
The Open Government Licence (OGL) was developed by the Controller of Her Majesty's Stationery Office (HMSO) to enable
information providers in the public sector to license the use and re-use of their information under a common open
licence.
It is designed to encourage use and re-use of information freely and flexibly, with only a few conditions.