-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
124 lines (119 loc) · 4.23 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
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.4"
services:
db:
image: postgres:13.7
# Turn off db logs by default
# https://postgresqlco.nf/doc/en/param/log_statement/
command: ["postgres", "-c", "log_statement=none"]
environment:
POSTGRES_DB: mercury
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
mq:
image: rabbitmq:3.10.20-management
environment:
RABBITMQ_DEFAULT_USER: gx_prod
RABBITMQ_DEFAULT_PASS: password
ports:
- 8042:15672
- 5672:5672
db-provisioner:
image: 258143015559.dkr.ecr.us-east-1.amazonaws.com/mercury/provisioner:0.4.1
environment:
PGPASSWORD: postgres
APP_DB_API_USER_PASSWORD: postgres
APP_DB_ADDR: db
# Note: We are overwriting the existing command, just adding a retry
# In Cloud environment, we connect to RDS so no need to worry about starting up
# In local, the DB needs a few seconds to boot up and listen
command: 'bash -c "until ./init-db.sh; do sleep 5; done;"'
depends_on:
- db
mq-wait:
image: debian
# Note: We are overwriting the existing command, just adding a retry
# In Cloud environment, we connect to RDS so no need to worry about starting up
# In local, the DB needs a few seconds to boot up and listen
command: 'bash -c "apt-get update; apt-get install curl -y; curl -iv -u gx_prod:password -X PUT http://mq:15672/api/exchanges/%2f/agent-exchange;"'
depends_on:
- mq
mercury-service-api:
platform: linux/amd64
image: 258143015559.dkr.ecr.us-east-1.amazonaws.com/mercury/api:v1api-latest
restart: always
volumes:
- ./services/ge_cloud/:/code
ports:
# V1 runs on external port 7000
- 5000:7000
environment:
LOGGING_LEVEL: ${LOGGING_LEVEL}
ENVIRONMENT: ${ENVIRONMENT}
MERCURY_DIALECT: postgresql
MERCURY_USER: gx_mercury_user
MERCURY_PASSWORD: postgres
MERCURY_HOST: db
MERCURY_DATABASE: mercury
GE_USAGE_STATISTICS_URL: ${GE_USAGE_STATISTICS_URL}
AMQP_CONNECTION_STRING: amqp://gx_prod:password@mq:5672
AMQP_REST_PORT: 15672
AUTH0_DOMAIN: ${AUTH0_DOMAIN}
AUTH0_API_AUDIENCE: ${AUTH0_API_AUDIENCE}
AUTH0_MERCURY_API_CLIENT_ID: ${AUTH0_MERCURY_API_CLIENT_ID}
AUTH0_MERCURY_API_CLIENT_SECRET: ${AUTH0_MERCURY_API_CLIENT_SECRET}
SLACK_CLIENT_SECRET: ${SLACK_CLIENT_SECRET}
SLACK_BOT_TOKEN: ${SLACK_BOT_TOKEN}
SLACK_REDIRECT_URI: ${SLACK_REDIRECT_URI}
SLACK_CLIENT_ID: ${SLACK_CLIENT_ID}
SENDGRID_API_KEY: ${SENDGRID_API_KEY}
LD_SDK_KEY: ${LD_SDK_KEY}
db-seeder:
image: 258143015559.dkr.ecr.us-east-1.amazonaws.com/mercury/api
restart: always
# For using localhost as db target
network_mode: "host"
volumes:
- ./services/ge_cloud/:/code
environment:
LOGGING_LEVEL: ${LOGGING_LEVEL}
ENVIRONMENT: ${ENVIRONMENT}
MERCURY_DIALECT: postgresql
MERCURY_USER: gx_mercury_user
MERCURY_PASSWORD: postgres
# Set to localhost since network_mode: host
MERCURY_HOST: localhost
MERCURY_DATABASE: mercury
GE_USAGE_STATISTICS_URL: ${GE_USAGE_STATISTICS_URL}
AMQP_CONNECTION_STRING: amqp://gx_prod:password@mq:5672
AMQP_REST_PORT: 15672
AUTH0_DOMAIN: ${AUTH0_DOMAIN}
AUTH0_API_AUDIENCE: ${AUTH0_API_AUDIENCE}
AUTH0_MERCURY_API_CLIENT_ID: ${AUTH0_MERCURY_API_CLIENT_ID}
AUTH0_MERCURY_API_CLIENT_SECRET: ${AUTH0_MERCURY_API_CLIENT_SECRET}
SLACK_CLIENT_SECRET: ${SLACK_CLIENT_SECRET}
SLACK_BOT_TOKEN: ${SLACK_BOT_TOKEN}
SLACK_REDIRECT_URI: ${SLACK_REDIRECT_URI}
SLACK_CLIENT_ID: ${SLACK_CLIENT_ID}
SENDGRID_API_KEY: ${SENDGRID_API_KEY}
LD_SDK_KEY: ${LD_SDK_KEY}
entrypoint: /bin/bash
command:
- -c
- |
cd /app/services/ge_cloud/mercury
alembic upgrade head
cd /app/services/ge_cloud
python -m tests.utils.dev_db_seed_script
depends_on:
- mq
gx-agent:
image: greatexpectations/agent:latest
restart: always
environment:
GX_CLOUD_ACCESS_TOKEN: ${GX_CLOUD_ACCESS_TOKEN}
GX_CLOUD_ORGANIZATION_ID: ${GX_CLOUD_ORGANIZATION_ID}
GX_CLOUD_BASE_URL: ${GX_CLOUD_BASE_URL}
depends_on:
- mercury-service-api