-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.backend.yml
124 lines (116 loc) · 4.45 KB
/
docker-compose.backend.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
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
version: '3'
services:
frontend:
depends_on:
- api
api:
image: gcr.io/sre-docker-registry/github.com/uktrade/data-hub-api:main
env_file: .env
environment:
DEBUG: 'False'
RESOURCE_SERVER_AUTH_TOKEN: sso-token
STAFF_SSO_BASE_URL: http://mock-sso:8080/
STAFF_SSO_AUTH_TOKEN: sso-token
ES_APM_ENABLED: 'False'
COLUMNS: 80
DJANGO_SUPERUSER_SSO_EMAIL_USER_ID: [email protected]
ALLOW_TEST_FIXTURE_SETUP: 'True'
ACTIVITY_STREAM_OUTGOING_URL: http://activity-feed-reverseproxy:8081/v2/activities
ACTIVITY_STREAM_OUTGOING_ACCESS_KEY_ID: incoming-some-id-1
ACTIVITY_STREAM_OUTGOING_SECRET_ACCESS_KEY: incoming-some-secret-1
ACTIVITY_STREAM_ACCESS_KEY_ID: some-id
ACTIVITY_STREAM_INCOMING_ACCESS_KEY_ID: some-id
ACTIVITY_STREAM_SECRET_ACCESS_KEY: some-secret
ACTIVITY_STREAM_INCOMING_SECRET_ACCESS_KEY: some-secret
DATABASE_CREDENTIALS: '{"username": "postgres", "password": "datahub", "engine": "postgres", "port": 5432, "dbname": "datahub", "host": "postgres", "dbInstanceIdentifier": "db-instance"}'
OMIS_PUBLIC_ACCESS_KEY_ID: access-key-id
OMIS_PUBLIC_SECRET_ACCESS_KEY: secret-access-key
ports:
- 8000:8000
depends_on:
- postgres
- opensearch
- redis
- rq
- mock-sso
entrypoint: dockerize -wait tcp://postgres:5432 -wait tcp://opensearch:9200 -wait tcp://redis:6379 -timeout 5m
command: /app/setup-uat.sh || echo "all good"
rq:
image: gcr.io/sre-docker-registry/github.com/uktrade/data-hub-api:main
env_file: .env
depends_on:
- postgres
- opensearch
- redis
entrypoint: dockerize -wait tcp://postgres:5432 -wait tcp://opensearch:9200 -wait tcp://redis:6379 -timeout 5m
command: python short-running-worker.py long-running-worker.py
environment:
DATABASE_CREDENTIALS: '{"username": "postgres", "password": "datahub", "engine": "postgres", "port": 5432, "dbname": "datahub", "host": "postgres", "dbInstanceIdentifier": "db-instance"}'
postgres:
image: postgres:16
ports:
- '5432:5432'
environment:
POSTGRES_DB: datahub
POSTGRES_USER: user
POSTGRES_PASSWORD: password
DATABASE_CREDENTIALS: '{"username": "postgres", "password": "datahub", "engine": "postgres", "port": 5432, "dbname": "datahub", "host": "postgres", "dbInstanceIdentifier": "db-instance"}'
opensearch:
image: opensearchproject/opensearch:2.11.0
ports:
- '9200:9200'
- '9300:9300'
environment:
- cluster.name=cluster-001
- node.name=node-001
- discovery.type=single-node
- bootstrap.memory_lock=true
- DISABLE_INSTALL_DEMO_CONFIG=true # Prevents execution of bundled demo script which installs demo certificates and security configurations to OpenSearch
- DISABLE_SECURITY_PLUGIN=true # Disables security plugin
logging:
driver: none
activity-feed-reverseproxy:
build: ./test/end-to-end/proxy
ports:
- 8081:8081
depends_on:
- activity-feed
activity-feed:
build: https://github.com/uktrade/activity-stream.git
depends_on:
- postgres
- opensearch
- redis
- api
ports:
- 8082:8082
environment:
- PORT=8082
- 'VCAP_SERVICES={"redis":[{"credentials":{"uri":"redis://redis:6379"}}],"opensearch":[{"credentials":{"uri":"http://some-id:some-secret@opensearch:9200"}, "plan": "123-123-123" } ] }'
- SENTRY_ENVIRONMENT=test
- SENTRY_DSN=http://abc:cvb@localhost:9872/123
- FEEDS__1__UNIQUE_ID=verification_feed_app
- FEEDS__1__SEED=http://api:8000/v3/activity-stream/event
- FEEDS__1__ACCESS_KEY_ID=some-id
- FEEDS__1__SECRET_ACCESS_KEY=some-secret
- FEEDS__1__TYPE=activity_stream
- INCOMING_ACCESS_KEY_PAIRS__1__KEY_ID=incoming-some-id-1
- INCOMING_ACCESS_KEY_PAIRS__1__SECRET_KEY=incoming-some-secret-1
- INCOMING_ACCESS_KEY_PAIRS__1__PERMISSIONS__activities__1=__MATCH_ALL__
- INCOMING_ACCESS_KEY_PAIRS__1__PERMISSIONS__objects__1=__MATCH_ALL__
- INCOMING_IP_WHITELIST__1=1.2.3.4
- INCOMING_IP_WHITELIST__2=2.3.4.5
redis:
image: redis:7.2.4
restart: always
ports:
- "6379:6379"
mock-sso:
image: gcr.io/sre-docker-registry/github.com/uktrade/mock-sso:latest
ports:
- 8080:8080
environment:
MOCK_SSO_SCOPE: data-hub:internal-front-end
MOCK_SSO_TOKEN: 123
MOCK_SSO_EMAIL_USER_ID: [email protected]
MOCK_SSO_USERNAME: [email protected]