-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.backend.yml
84 lines (78 loc) · 2.8 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
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'
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
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]