forked from cloud-carbon-footprint/cloud-carbon-footprint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
100 lines (99 loc) · 3.79 KB
/
docker-compose.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
version: '3.9'
services:
client:
image: cloudcarbonfootprint/client:latest
ports:
- '80:80'
volumes:
- ./docker/nginx.conf:/etc/nginx/nginx.conf
depends_on:
- api
api:
image: cloudcarbonfootprint/api:latest
ports:
- '4000:4000'
volumes:
- $HOME/.aws/credentials:/root/.aws/credentials
- $HOME/.config/gcloud/service-account-keys.json:/root/.config/gcloud/service-account-keys.json
secrets:
- AWS_TARGET_ACCOUNT_ROLE_NAME
- AWS_ATHENA_DB_NAME
- AWS_ATHENA_DB_TABLE
- AWS_ATHENA_REGION
- AWS_ATHENA_QUERY_RESULT_LOCATION
- AWS_BILLING_ACCOUNT_ID
- AWS_BILLING_ACCOUNT_NAME
- GCP_BIG_QUERY_TABLE
- GCP_BILLING_PROJECT_ID
- GCP_BILLING_PROJECT_NAME
- AZURE_CLIENT_ID
- AZURE_CLIENT_SECRET
- AZURE_TENANT_ID
- MONGODB_URI
- MONGODB_CREDENTIALS
# uncomment to define this as the certificate file for your MongoDB
#- x509-cert-mongodb.pem
# Uncomment to enable Electricity Maps API for Emissions Factors
#- ELECTRICITY_MAPS_TOKEN
environment:
# set the CACHE_MODE to MONGODB to use MongoDB
- CACHE_MODE=LOCAL
- AWS_USE_BILLING_DATA=true
- AWS_TARGET_ACCOUNT_ROLE_NAME=/run/secrets/AWS_TARGET_ACCOUNT_ROLE_NAME
- AWS_ATHENA_DB_NAME=/run/secrets/AWS_ATHENA_DB_NAME
- AWS_ATHENA_DB_TABLE=/run/secrets/AWS_ATHENA_DB_TABLE
- AWS_ATHENA_REGION=/run/secrets/AWS_ATHENA_REGION
- AWS_ATHENA_QUERY_RESULT_LOCATION=/run/secrets/AWS_ATHENA_QUERY_RESULT_LOCATION
- AWS_BILLING_ACCOUNT_ID=/run/secrets/AWS_BILLING_ACCOUNT_ID
- AWS_BILLING_ACCOUNT_NAME=/run/secrets/AWS_BILLING_ACCOUNT_NAME
- GCP_USE_BILLING_DATA=true
- GCP_USE_CARBON_FREE_ENERGY_PERCENTAGE=true
- GOOGLE_APPLICATION_CREDENTIALS=/root/.config/gcloud/service-account-keys.json
- GCP_BIG_QUERY_TABLE=/run/secrets/GOOGLE_APPLICATION_CREDENTIALS
- GCP_BILLING_PROJECT_ID=/run/secrets/GCP_BIG_QUERY_TABLE
- GCP_BILLING_PROJECT_NAME=/run/secrets/GCP_BILLING_PROJECT_ID
- AZURE_USE_BILLING_DATA=true
- AZURE_CLIENT_ID=/run/secrets/AZURE_CLIENT_ID
- AZURE_CLIENT_SECRET=/run/secrets/AZURE_CLIENT_SECRET
- AZURE_TENANT_ID=/run/secrets/AZURE_TENANT_ID
# uncomment to enable MongoDB
#- MONGODB_URI=/run/secrets/MONGODB_URI
#- MONGODB_CREDENTIALS=/run/secrets/MONGODB_CREDENTIALS
#- x509-cert-mongodb.pem=/run/secrets/x509-cert-mongodb.pem
secrets:
AWS_TARGET_ACCOUNT_ROLE_NAME:
file: ~/.docker/secrets/AWS_TARGET_ACCOUNT_ROLE_NAME
AWS_ATHENA_DB_NAME:
file: ~/.docker/secrets/AWS_ATHENA_DB_NAME
AWS_ATHENA_DB_TABLE:
file: ~/.docker/secrets/AWS_ATHENA_DB_TABLE
AWS_ATHENA_REGION:
file: ~/.docker/secrets/AWS_ATHENA_REGION
AWS_ATHENA_QUERY_RESULT_LOCATION:
file: ~/.docker/secrets/AWS_ATHENA_QUERY_RESULT_LOCATION
AWS_BILLING_ACCOUNT_ID:
file: ~/.docker/secrets/AWS_BILLING_ACCOUNT_ID
AWS_BILLING_ACCOUNT_NAME:
file: ~/.docker/secrets/AWS_BILLING_ACCOUNT_NAME
GCP_BIG_QUERY_TABLE:
file: ~/.docker/secrets/GCP_BIG_QUERY_TABLE
GCP_BILLING_PROJECT_ID:
file: ~/.docker/secrets/GCP_BILLING_PROJECT_ID
GCP_BILLING_PROJECT_NAME:
file: ~/.docker/secrets/GCP_BILLING_PROJECT_NAME
AZURE_CLIENT_ID:
file: ~/.docker/secrets/AZURE_CLIENT_ID
AZURE_CLIENT_SECRET:
file: ~/.docker/secrets/AZURE_CLIENT_SECRET
AZURE_TENANT_ID:
file: ~/.docker/secrets/AZURE_TENANT_ID
MONGODB_URI:
file: ~/.docker/secrets/MONGODB_URI
MONGODB_CREDENTIALS:
file: ~/.docker/secrets/MONGODB_CREDENTIALS
# uncomment to refer to your MongoDB cert file
#x509-cert-mongodb.pem:
# file: ~/.docker/secrets/x509-cert-mongodb.pem
# uncomment to refer to your Electricity Maps API token
# ELECTRICITY_MAPS_TOKEN
# file: ~/.docker/secrets/ELECTRICITY_MAPS_TOKEN