-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
164 lines (156 loc) · 4.32 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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
version: "3"
services:
db:
build:
context: "./db"
dockerfile: ${DB_DOCKERFILE:-Dockerfile}
args:
ENCRYPTION_PASSWORD: ${ENCRYPTION_PASSWORD}
image: fecfile-db
container_name: fecfile-db
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_NAME: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
extra_hosts:
- "host.docker.internal:host-gateway"
redis:
image: redis:6.2-alpine
ports:
- "6379:6379"
command: redis-server
api-worker:
build:
context: "./"
dockerfile: "${WORKER_DOCKERFILE:-Worker_Dockerfile}"
image: fecfile-celery-worker
container_name: fecfile-celery-worker
volumes:
- ./django-backend:/opt/nxg_fec
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on:
- db
- redis
links:
- redis
environment:
REDIS_URL: redis://redis:6379
DATABASE_URL:
FECFILE_TEST_DB_NAME:
DJANGO_SETTINGS_MODULE: fecfiler.settings.local
DJANGO_SECRET_KEY:
FECFILE_FEC_WEBSITE_API_KEY: DEMO_KEY
AWS_ACCESS_KEY_ID:
AWS_SECRET_ACCESS_KEY:
AWS_STORAGE_BUCKET_NAME:
AWS_REGION:
CELERY_WORKER_STORAGE:
MOCK_EFO: True
FEC_FILING_API:
FEC_FILING_API_KEY:
FEC_AGENCY_ID:
OUTPUT_TEST_INFO_IN_DOT_FEC:
LOG_FORMAT:
FLAG__COMMITTEE_DATA_SOURCE: MOCKED # Values are PRODUCTION, TEST, and MOCKED
ENABLE_DEVELOPER_COMMANDS: True
deploy:
resources:
limits:
memory: 1G
api:
build:
context: "./"
dockerfile: "${API_DOCKERFILE:-Dockerfile}"
image: fecfile-api
container_name: fecfile-api
volumes:
- ./django-backend:/opt/nxg_fec
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on:
- db
- redis
links:
- redis
environment:
REDIS_URL: redis://redis:6379
DATABASE_URL:
FECFILE_TEST_DB_NAME:
DJANGO_SETTINGS_MODULE: fecfiler.settings.local
DJANGO_SECRET_KEY:
FECFILE_FEC_WEBSITE_API_KEY: DEMO_KEY
MOCK_OIDC_PROVIDER: True
OIDC_RP_CLIENT_ID:
OIDC_RP_CLIENT_SECRET:
LOGIN_REDIRECT_SERVER_URL: http://localhost:8080/api/v1/oidc/login-redirect
LOGIN_REDIRECT_CLIENT_URL: http://localhost:4200
LOGOUT_REDIRECT_URL: http://localhost:8080/api/v1/oidc/logout-redirect
SYSTEM_STATUS_CACHE_AGE:
AWS_ACCESS_KEY_ID:
AWS_SECRET_ACCESS_KEY:
AWS_STORAGE_BUCKET_NAME:
AWS_REGION:
CELERY_WORKER_STORAGE:
MOCK_EFO: True
FEC_FILING_API:
FEC_FILING_API_KEY:
FEC_AGENCY_ID:
OUTPUT_TEST_INFO_IN_DOT_FEC:
PRODUCTION_OPEN_FEC_API: https://api.open.fec.gov/v1/
PRODUCTION_OPEN_FEC_API_KEY: DEMO_KEY
STAGE_OPEN_FEC_API: https://api-stage.open.fec.gov/v1/
STAGE_OPEN_FEC_API_KEY: DEMO_KEY
LOG_FORMAT:
FECFILE_GITHUB_TOKEN:
OIDC_OP_AUTODISCOVER_ENDPOINT: http://localhost:8080/api/v1/mock_oidc_provider/.well-known/openid-configuration
INITIAL_POLLING_INTERVAL: 10
INITIAL_POLLING_DURATION: 900
SECONDARY_POLLING_INTERVAL: 3600
SECONDARY_POLLING_DURATION: 86400
CREATE_COMMITTEE_ACCOUNT_ALLOWED_EMAIL_LIST:
ENABLE_DEVELOPER_COMMANDS: True
# ---- FEATURE FLAGS ----
FLAG__COMMITTEE_DATA_SOURCE: MOCKED # Values are PRODUCTION, TEST, and MOCKED
deploy:
resources:
limits:
memory: 2G
nginx:
build: https://github.com/fecgov/fecfile-api-proxy.git#develop
container_name: fecfile-api-proxy
sysctls:
- net.ipv6.conf.all.disable_ipv6=1
ports:
- 8080:8080
depends_on:
- api
deploy:
resources:
limits:
memory: 256M
locust-leader:
image: locustio/locust
ports:
- "8089:8089"
volumes:
- ./:/mnt/locust
command: -f /mnt/locust/performance-testing/locust_run.py --master -H http://fecfile-api:8080
profiles: [locust]
environment:
LOCAL_TEST_USER:
LOCAL_TEST_PWD:
OIDC_SESSION_ID:
locust-follower:
image: locustio/locust
volumes:
- ./:/mnt/locust
command: -f /mnt/locust/performance-testing/locust_run.py --worker --master-host locust-leader -L DEBUG
profiles: [locust]
environment:
LOCAL_TEST_USER:
LOCAL_TEST_PWD:
OIDC_SESSION_ID: