Skip to content

Commit

Permalink
Merge pull request #91 from dlcs/feature/local_setup
Browse files Browse the repository at this point in the history
Add sample appSettings + compose file for postgres
  • Loading branch information
donaldgray authored Oct 11, 2024
2 parents 0b3e376 + 97f94f4 commit 549bdf4
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .env.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# PostgreSQL
# ------------------------------------------------------------------------------
POSTGRES_HOST=postgres
POSTGRES_PORT=5432
POSTGRES_DB=postgres
POSTGRES_USER=postgres
POSTGRES_PASSWORD=presentation_password
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,15 @@
# iiif-presentation
Allows for the creation and management of IIIF manifests
# IIIF Presentation

Allows for the creation and management of IIIF Manifests and Collections.

## Local Development

There is a docker-compose file for running resources required for local development.

```bash
# create .env file (1 time only)
cp .env.dist .env

# run via docker-compose
docker compose -f docker-compose.local.yml up
```
15 changes: 15 additions & 0 deletions docker-compose.local.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
volumes:
pres_postgres_data: {}
pres_postgres_data_backups: {}

services:
postgres:
image: postgres:14
hostname: postgres
ports:
- "5452:5432"
volumes:
- pres_postgres_data:/var/lib/postgresql/data
- pres_postgres_data_backups:/backups
env_file:
- .env
28 changes: 28 additions & 0 deletions src/IIIFPresentation/API/appsettings.Example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"RunMigrations": true,
"ResourceRoot": "https://localhost:7230",
"AWS": {
"Profile": "dlcs",
"Region": "eu-west-1",
"S3": {
"StorageBucket": "presentation-bucket"
}
},
"ConnectionStrings": {
"PostgreSQLConnection": "Server=127.0.0.1;Port=5452;Database=postgres;User Id=postgres;Password=presentation_password;IncludeErrorDetail=True"
},
"CacheSettings": {
"TimeToLive": {
"Memory": {
"ShortTtlSecs": 10,
"DefaultTtlSecs": 30,
"LongTtlSecs": 60
},
"Http": {
"ShortTtlSecs": 10,
"DefaultTtlSecs": 40,
"LongTtlSecs": 60
}
}
}
}

0 comments on commit 549bdf4

Please sign in to comment.