forked from kolzchut/srm-devops
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
126 lines (116 loc) · 4.08 KB
/
docker-compose.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
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
version: '3.4'
services:
elasticsearch:
image: ghcr.io/whiletrue-industries/srm-etl-elasticsearch:617261835d33baae54e244fedc8ef89f7a90a7dd@sha256:b8abc23ee75eb39aa831f3ca55f2d8db7dafb57500909cb817745a7e13a38666
restart: on-failure
ports:
- "9200:9200"
environment:
discovery.type: single-node
xpack.security.enabled: "true"
ELASTIC_PASSWORD: "Aa123456"
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
# to allow setting up backups using snapshots, set the following in .env file
S3_CLIENT_DEFAULT_ACCESS_KEY: "${S3_CLIENT_DEFAULT_ACCESS_KEY}"
S3_CLIENT_DEFAULT_SECRET_KEY: "${S3_CLIENT_DEFAULT_SECRET_KEY}"
volumes:
- "elasticsearch:/usr/share/elasticsearch/data"
kibana:
image: docker.elastic.co/kibana/kibana:7.13.3@sha256:4aef97e6d0ac46eec716337bff18ba4a7b4e101680039588b5729fc3f90bf730
restart: on-failure
ports:
- "5601:5601"
environment:
ELASTICSEARCH_HOSTS: "http://elasticsearch:9200"
ELASTICSEARCH_USERNAME: elastic
ELASTICSEARCH_PASSWORD: "Aa123456"
depends_on:
- elasticsearch
db:
image: ghcr.io/whiletrue-industries/srm-etl-db:9ce02bcde3742805847ed5e925fe7da0e01cab34@sha256:ebb25f6a73151e0cf9167e8fb25590b6d3064b4771fdf2a761836c9fdc08ecb3
restart: on-failure
ports:
- "5432:5432"
volumes:
- "db:/var/lib/postgresql/data"
environment:
DB_RESTORE_AWS_ACCESS_KEY_ID: "${DB_RESTORE_AWS_ACCESS_KEY_ID}"
DB_RESTORE_AWS_SECRET_ACCESS_KEY: "${DB_RESTORE_AWS_SECRET_ACCESS_KEY}"
DB_RESTORE_BUCKET_PATH_FILENAME: "${DB_RESTORE_BUCKET_PATH_FILENAME}"
db-backup:
image: ghcr.io/whiletrue-industries/srm-etl-db:9ce02bcde3742805847ed5e925fe7da0e01cab34@sha256:ebb25f6a73151e0cf9167e8fb25590b6d3064b4771fdf2a761836c9fdc08ecb3
command: ["/srv/backup.sh"]
restart: "no"
environment:
DB_BACKUP_HOST: db
# following env var values should be set in .env file
DB_BACKUP_BUCKET: "${DB_BACKUP_BUCKET}"
DB_BACKUP_AWS_ACCESS_KEY_ID: "${DB_BACKUP_AWS_ACCESS_KEY_ID}"
DB_BACKUP_AWS_SECRET_ACCESS_KEY: "${DB_BACKUP_AWS_SECRET_ACCESS_KEY}"
depends_on:
- db
srm-api:
image: ghcr.io/whiletrue-industries/srm-api:latest
restart: on-failure
ports:
- "5000:5000"
environment:
DATABASE_READONLY_URL: "postgresql://readonly:readonly@db/datasets"
ES_INDEX_NAME: "srm"
ES_DATAPACKAGE: "https://next.obudget.org/datapackages/budgetkey/gov_decisions/datapackage.json"
ES_HOST: "elasticsearch"
ES_PORT: "9200"
ES_HTTP_AUTH: "elastic:Aa123456"
depends_on:
- elasticsearch
- db
srm-etl-minio:
image: minio/minio:edge@sha256:78b6513160ee72794698b808afbeff67b44b510d6d024e0728adc57d726b6c8b
command:
- server
- /data
ports:
- "9000:9000"
environment:
MINIO_ACCESS_KEY: access_key
MINIO_SECRET_KEY: secret_key
MINIO_REGION_NAME: us-east-1
volumes:
- "srmetlminio:/data"
srm-etl:
image: ghcr.io/whiletrue-industries/srm-etl:latest
restart: on-failure
ports:
- "15000:5000"
environment:
EXTERNAL_ADDRESS: http://localhost:15000
BUCKET_NAME: dgp-app
AWS_ACCESS_KEY_ID: access_key
AWS_SECRET_ACCESS_KEY: secret_key
S3_ENDPOINT_URL: http://minio:9000
GOOGLE_KEY: "${GOOGLE_KEY}"
GOOGLE_SECRET: "${GOOGLE_SECRET}"
DATABASE_URL: postgresql://postgres:postgres@db/auth
DATASETS_DATABASE_URL: postgresql://postgres:postgres@db/datasets
AIRFLOW__DATABASE__SQL_ALCHEMY_CONN: postgresql://postgres:postgres@db/airflow
ETLS_DATABASE_URL: postgresql://postgres:postgres@db/etls
ES_HOST: "elasticsearch"
ES_PORT: "9200"
ES_HTTP_AUTH: "elastic:Aa123456"
ES_INDEX_NAME: "srm"
AWS_REGION: us-east-1
SENDGRID_API_KEY: ""
PUBLIC_KEY_B64: "${PUBLIC_KEY_B64}"
PRIVATE_KEY_B64: "${PRIVATE_KEY_B64}"
depends_on:
- db
- srm-etl-minio
srm-frontend:
image: ghcr.io/whiletrue-industries/srm-frontend:latest
restart: on-failure
ports:
- "4000:4000"
volumes:
elasticsearch:
db:
srmetlminio: