forked from mcagov/beacons
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
139 lines (129 loc) · 4.12 KB
/
docker-compose.yml
File metadata and controls
139 lines (129 loc) · 4.12 KB
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# Instead of using Docker Compose directly, w use make commands to run the application locally, see README.md#local-development
version: "3.9"
##
# A containerised local development environment similar to the deployed environment
#
# ! Requires Docker Desktop to be configured with 4GB of RAM !
##
services:
postgres:
image: library/postgres:12
environment:
POSTGRES_USER: beacons_service
POSTGRES_PASSWORD: password
POSTGRES_DB: beacons
ports:
- "5432:5432"
opensearch:
image: opensearchproject/opensearch:1.1.0
environment:
- discovery.type=single-node
volumes:
- ./opensearch/opensearch.dev.yml:/usr/share/opensearch/config/opensearch.yml
expose:
- 9200 # Core OpenSearch queries
- 9600 # Performance Analyzer queries
ports: # Exposed only for local development with a non-Dockerized Spring; these ports are private when deployed
- "9200:9200"
- "9600:9600"
# Client queries to OpenSearch from the public internet are authenticated using Azure AD and proxied through to
# OpenSearch for security.
opensearch-proxy:
build: ./opensearch/proxy
image: beacons-opensearch-proxy
ports:
- "8081:80"
environment:
OPENSEARCH_DOMAIN: "opensearch:9200"
OPENSEARCH_PROTOCOL: "http"
LOCAL: "true"
APPLICATION_CREDENTIALS_BASE64: "" # Not used in local development
opensearch-dashboards:
image: opensearchproject/opensearch-dashboards:1.1.0
ports:
- "5601:5601"
environment:
OPENSEARCH_HOSTS: '["http://opensearch-proxy"]'
DISABLE_SECURITY_DASHBOARDS_PLUGIN: "true"
service:
build:
context: ./service
image: beacons-service
ports:
- "8080:8080"
restart: on-failure
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/beacons
SPRING_PROFILES_ACTIVE: dev,seed
OPENSEARCH_ENDPOINT: opensearch
EXPORT_DIRECTORY: /var/export
MICROSOFT_GRAPH_CLIENT_ID: ${MICROSOFT_GRAPH_CLIENT_ID}
MICROSOFT_GRAPH_CLIENT_SECRET: ${MICROSOFT_GRAPH_CLIENT_SECRET}
MICROSOFT_GRAPH_B2C_TENANT_ID: ${MICROSOFT_GRAPH_B2C_TENANT_ID}
MICROSOFT_GRAPH_B2C_TENANT_NAME: TESTB2CMCGA
volumes:
- /tmp/beacons:/var/export
depends_on:
opensearch:
condition: service_started
postgres:
condition: service_started
backoffice:
build:
context: ./backoffice
args:
feedback_email_addresses: dev@mcga.gov.uk,dev@madetech.com
mui_pro_license_key: ""
image: beacons-backoffice
ports:
- "3001:80"
environment:
AZURE_AD_TENANT_ID: "513fb495-9a90-425b-a49a-bc6ebe2a429e"
AZURE_AD_CLIENT_ID: "5cdcbb41-958a-43b6-baa1-bbafd80b4f70"
VITE_APP_FEEDBACK_EMAIL_ADDRESSES: "x@y.com,y@z.com"
redis:
image: redis:6
ports:
- "6379:6379"
webapp:
build:
context: ./webapp
environment:
API_URL: http://service:8080/spring-api
WEBAPP_CLIENT_ID: 1ccbe14d-00e3-43ac-a434-8f7a38e03366
AAD_API_ID: 5cdcbb41-958a-43b6-baa1-bbafd80b4f70
AAD_TENANT_ID: 513fb495-9a90-425b-a49a-bc6ebe2a429e
REDIS_URI: redis://redis:6379
NEXTAUTH_URL: http://localhost:3000
AZURE_B2C_CLIENT_ID: 12cddf78-7d05-4d87-add6-9af0391b5918
AZURE_B2C_CLIENT_SECRET: ${AZURE_B2C_CLIENT_SECRET}
AZURE_B2C_TENANT_NAME: TESTB2CMCGA
AZURE_B2C_TENANT_ID: 9dd74e6c-246b-4bf1-bc55-6989737d5965
AZURE_B2C_LOGIN_FLOW: B2C_1_login_beacons
AZURE_B2C_SIGNUP_FLOW: B2C_1_signup_beacons
JWT_SECRET: ${JWT_SECRET}
GOV_NOTIFY_FEEDBACK_EMAIL_ADDRESS: ${GOV_NOTIFY_FEEDBACK_EMAIL_ADDRESS}
GOV_NOTIFY_API_KEY: ${GOV_NOTIFY_API_KEY}
WEBAPP_CLIENT_SECRET: ${WEBAPP_CLIENT_SECRET}
ports:
- "3000:3000"
links:
- opensearch
- postgres
depends_on:
opensearch:
condition: service_started
postgres:
condition: service_started
healthcheck:
test:
[
"CMD",
"curl",
"-f",
"http://localhost:8080/spring-api/actuator/health",
]
interval: 10s
timeout: 10s
retries: 12
restart: on-failure