-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
50 lines (49 loc) · 1.62 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
volumes:
broker-storage:
postgres-data:
services:
storage:
image: mcr.microsoft.com/azure-storage/azurite:latest
ports:
- "10000:10000"
- "10001:10001"
healthcheck:
test: nc 127.0.0.1 10000 -z
interval: 1s
retries: 30
storage_init:
image: mcr.microsoft.com/azure-cli:latest
command:
- /bin/sh
- -c
- |
az storage container create --name brokerfiles
depends_on:
storage:
condition: service_healthy
environment:
AZURE_STORAGE_CONNECTION_STRING: DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://storage:10000/devstoreaccount1;
database:
image: 'postgres:latest'
ports:
- 5432:5432
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: broker
volumes:
- postgres-data:/var/lib/postgresql/data
- ./tests/Altinn.Broker.Tests/Data/postgresql.conf:/etc/postgresql/postgresql.conf
command: postgres -c config_file=/etc/postgresql/postgresql.conf
database_migration:
image: flyway/flyway:latest
command: -url='jdbc:postgresql://database:5432/broker' -user=postgres -password=postgres -connectRetries=60 migrate -validateMigrationNaming='true'
volumes:
- ./src/Altinn.Broker.Persistence/Migrations:/flyway/sql
- ./tests/Altinn.Broker.Tests/Data/:/flyway/sql/R__Prepare_Test_Data.sql
depends_on:
- database
entrypoint:
[
"flyway",
]