generated from DEFRA/ffc-template-node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.api-tests.yaml
97 lines (91 loc) · 4.6 KB
/
docker-compose.api-tests.yaml
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
version: '3.8'
x-common-migration: &common-migration
POSTGRES_HOST: ${POSTGRES_HOST:-aphw-ddi-api-postgres-api-tests}
SCHEMA_ROLE: ${POSTGRES_SCHEMA_ROLE:-postgres}
SCHEMA_USERNAME: ${POSTGRES_SCHEMA_USERNAME:-postgres}
SCHEMA_PASSWORD: ${POSTGRES_SCHEMA_PASSWORD:-ppp}
SCHEMA_NAME: ${POSTGRES_SCHEMA_NAME:-public}
x-common-postgres: &common-postgres
POSTGRES_PORT: 5432
POSTGRES_DB: ${POSTGRES_DB:-aphw-ddi}
POSTGRES_USERNAME: ${POSTGRES_ADMIN_USERNAME:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_ADMIN_PASSWORD:-ppp}
services:
database-up:
image: liquibase/liquibase:4.27.0
environment:
<<: [ *common-migration, *common-postgres ]
entrypoint: >
sh -c "/scripts/migration/database-up"
depends_on:
- aphw-ddi-api-postgres-api-tests
volumes:
- ./changelog:/liquibase/changelog
- ./scripts:/scripts
aphw-ddi-api:
build:
target: development
image: aphw-ddi-api-development
container_name: aphw-ddi-api-api-tests
ports:
- "3001:3000"
- "9230:9229"
volumes:
- ./app:/home/node/app
- ./package.json:/home/node/package.json
depends_on:
- aphw-ddi-api-postgres-api-tests
- aphw-ddi-api-azurite
environment:
APPINSIGHTS_CLOUDROLE: aphw-ddi-api-local
APPINSIGHTS_CONNECTIONSTRING: ${APPINSIGHTS_CONNECTIONSTRING}
MESSAGE_QUEUE_HOST: ${MESSAGE_QUEUE_HOST}
MESSAGE_QUEUE_PASSWORD: ${MESSAGE_QUEUE_PASSWORD}
MESSAGE_QUEUE_USER: ${MESSAGE_QUEUE_USER}
EVENTS_TOPIC_ADDRESS: ${EVENTS_TOPIC_ADDRESS:-aphw-ddi-events}${MESSAGE_QUEUE_SUFFIX}
NOTIFICATIONS_TOPIC_ADDRESS: ${NOTIFICATIONS_TOPIC_ADDRESS:-aphw-ddi-notifications}${MESSAGE_QUEUE_SUFFIX}
CERTIFICATE_REQUEST_QUEUE: ${CERTIFICATE_REQUEST_QUEUE:-aphw-ddi-certificate-request}${MESSAGE_QUEUE_SUFFIX}
AZURE_STORAGE_ACCOUNT_NAME: ${AZURE_STORAGE_ACCOUNT_NAME:-devstoreaccount1}
AZURE_STORAGE_CREATE_CONTAINERS: "true"
AZURE_STORAGE_CONNECTION_STRING: ${AZURE_STORAGE_CONNECTION_STRING:-DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://aphw-ddi-api-azurite:10000/devstoreaccount1;}
AZURE_STORAGE_USE_CONNECTION_STRING: "true"
ROBOT_SHEET_NAME: ${ROBOT_SHEET_NAME:-Passed}
OS_PLACES_API_KEY: ${OS_PLACES_API_KEY:-test}
OS_PLACES_API_BASE_URL: ${OS_PLACES_API_BASE_URL:-test}
POLICE_API_BASE_URL: ${POLICE_API_BASE_URL:-test}
# Fake public keys for testing
PORTAL_PUBLIC_KEY: "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUE0Vm8rVWtaTzJPK3BrMDBmbHcyTgo3cU5DeGRIazdxWmFIVnNwb1hOYWRwSzFPN1BXNHJKNEZaTWdYSFdFTnBpV3lFdzBNNEw5Sm1FSzROWSs4QkRQCnN2cS9HNXU3dW80c2lDRHhtWlhzZ3hPUDJmbndBcHcxKzRtcnBicTJMaTJpQmZqUzlLSG5ZVlN0MEkwd0VBcHMKS1B2V2hrVm1oY3ZMNkZoeCtxdFhmOTJyZ2pEUWFid3pNZWplM1J3UkxMbU8xZE1qVFIrc2M0dVZoT0NIQWVXSwozTHI5UEF5SEZIWUpsdHNJOG5BbU1MQnlHemVjY0ZlRU1aNDBwU2htTit2N1BvL0hEL0ZuY1dOc3JJeXg0SHl6CmJ3dmI5Qm8zTjlDM2RSRkV6bGVvUWR6b3lKdWI4Y2Vzc21NTFBZSUdoMGswbVlFYzZJUk1kSzVTT0NocVp2S3MKbVFJREFRQUIKLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0tCg=="
ENFORCEMENT_PUBLIC_KEY: ${ENFORCEMENT_PUBLIC_KEY}
AUTH_SERVER_URL: ${AUTH_SERVER_URL:-https://oidc.integration.account.gov.uk}
POSTGRES_DB: aphw-ddi
POSTGRES_HOST: ${POSTGRES_HOST:-aphw-ddi-api-postgres-api-tests}
POSTGRES_PORT: 5432
POSTGRES_SCHEMA_NAME: ${POSTGRES_SCHEMA_NAME:-public}
POSTGRES_USERNAME: ${POSTGRES_SCHEMA_USERNAME:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_SCHEMA_PASSWORD:-ppp}
OVERNIGHT_JOB_CRONTAB: ${OVERNIGHT_JOB_CRONTAB:-5 4 * * *}
OVERNIGHT_EXPORT_BATCH_SIZE: ${OVERNIGHT_EXPORT_BATCH_SIZE:-2000}
PARANOID_RETENTION_PERIOD: ${PARANOID_RETENTION_PERIOD:-90}
USER_FEEDBACK_EMAIL_ADDRESS: ${USER_FEEDBACK_EMAIL_ADDRESS:[email protected]}
ENFORCEMENT_URL: ${ENFORCEMENT_URL}
REPORT_SOMETHING_EMAIL_ADDRESS: ${REPORT_SOMETHING_EMAIL_ADDRESS:[email protected]}
DDI_DOCUMENTS_BASE_URL: ${DDI_DOCUMENTS_BASE_URL:-http://host.docker.internal:3008}
aphw-ddi-api-postgres-api-tests:
image: postgres:11.22-alpine
ports:
- "5432:5432"
environment:
POSTGRES_DB: aphw-ddi
POSTGRES_USERNAME: postgres
POSTGRES_PASSWORD: ppp
aphw-ddi-api-azurite:
image: mcr.microsoft.com/azure-storage/azurite:3.23.0
command: "azurite-blob --skipApiVersionCheck --loose --blobHost 0.0.0.0 -l data"
volumes:
- azurite_data:/opt/azurite/data
ports:
- "10000:10000"
labels:
com.docker.compose.pay.role: aphw-ddi-api-azurite
volumes:
azurite_data: