-
Notifications
You must be signed in to change notification settings - Fork 15
/
docker-compose.yml
184 lines (176 loc) · 5.27 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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
version: "3"
services:
scorecard:
build:
context: .
args:
USER_ID: ${USER_ID:-1001}
GROUP_ID: ${GROUP_ID:-1001}
command: bin/wait-for-postgres.sh python manage.py runserver 0.0.0.0:8001
volumes:
- ".:/app"
environment:
- DJANGO_DEBUG
- DATABASE_URL=postgres://municipal_finance:municipal_finance@postgres/municipal_finance
- DJANGO_SECRET_KEY=not-so-secret
- SITE_ID=2
- DATA_PORTAL_URL=http://portal:8002
- SENTRY_ENVIRONMENT=development
- SENTRY_DSN
- SENTRY_PERF_SAMPLE_RATE
- AWS_ACCESS_KEY_ID=minio-access-key
- AWS_SECRET_ACCESS_KEY=minio-secret-key
- AWS_STORAGE_BUCKET_NAME=municipal-money
- AWS_S3_ENDPOINT_URL=http://minio:9000
- AWS_S3_SECURE_URLS=True
- AWS_S3_CUSTOM_DOMAIN
- UPDATE_BULK_DOWNLOADS=False
- BULK_DOWNLOAD_DIR=bulk_downloads_dev
- DJANGO_DEBUG_TOOLBAR
ports:
- '8001:8001'
working_dir: /app
depends_on:
- postgres
- portal
- minio-client
- minio
stdin_open: true
tty: true
postgres:
image: postgres:12.17
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=municipal_finance
- POSTGRES_USER=municipal_finance
- POSTGRES_PASSWORD=municipal_finance
portal:
build:
context: .
args:
USER_ID: ${USER_ID:-1001}
GROUP_ID: ${GROUP_ID:-1001}
dockerfile: Dockerfile
command: bin/wait-for-postgres.sh python manage.py runserver 0.0.0.0:8002
# command: bin/wait-for-postgres.sh gunicorn --limit-request-line 7168 --worker-class gevent municipal_finance.wsgi:application -t 600 --log-file - -b 0.0.0.0:8002
volumes:
- ".:/app"
environment:
- DATABASE_URL=postgres://municipal_finance:municipal_finance@postgres/municipal_finance
- DJANGO_SECRET_KEY=not-so-secret
- SENTRY_ENVIRONMENT=development
- SENTRY_DSN
- SENTRY_PERF_SAMPLE_RATE
- SITE_ID=3
- PRELOAD_CUBES=true
- DATA_PORTAL_URL=http://portal:8002
- AWS_ACCESS_KEY_ID=minio-access-key
- AWS_SECRET_ACCESS_KEY=minio-secret-key
- AWS_STORAGE_BUCKET_NAME=municipal-money
- AWS_S3_ENDPOINT_URL=http://minio:9000
- AWS_S3_SECURE_URLS=True
- AWS_S3_CUSTOM_DOMAIN
- BULK_DOWNLOAD_DIR=bulk_downloads_dev
working_dir: /app
ports:
- '8002:8002'
depends_on:
- postgres
- minio
worker:
build:
context: .
args:
USER_ID: ${USER_ID:-1001}
GROUP_ID: ${GROUP_ID:-1001}
command: bin/wait-for-postgres.sh python manage.py qcluster
volumes:
- ".:/app"
environment:
- DATABASE_URL=postgres://municipal_finance:municipal_finance@postgres/municipal_finance
- DJANGO_SECRET_KEY=not-so-secret
- SENTRY_ENVIRONMENT=development
- SENTRY_DSN
- SENTRY_PERF_SAMPLE_RATE
- SITE_ID=2
- PRELOAD_CUBES=true
- DATA_PORTAL_URL=http://portal:8002
- AWS_ACCESS_KEY_ID=minio-access-key
- AWS_SECRET_ACCESS_KEY=minio-secret-key
- AWS_STORAGE_BUCKET_NAME=municipal-money
- AWS_S3_ENDPOINT_URL=http://minio:9000
- AWS_S3_SECURE_URLS=True
- AWS_S3_CUSTOM_DOMAIN
- UPDATE_BULK_DOWNLOADS=True
- BULK_DOWNLOAD_DIR=bulk_downloads_dev
working_dir: /app
depends_on:
- postgres
- minio
restart: on-failure
test:
build:
context: .
args:
USER_ID: ${USER_ID:-1001}
GROUP_ID: ${GROUP_ID:-1001}
dockerfile: Dockerfile-test
command: bin/wait-for-postgres.sh python manage.py test municipal_finance scorecard infrastructure household
volumes:
- ".:/app"
environment:
- DJANGO_DEBUG
- DATABASE_URL=postgres://municipal_finance:municipal_finance@postgres/municipal_finance
- DJANGO_SECRET_KEY=not-so-secret
- SITE_ID=2
- DATA_PORTAL_URL=http://portal:8002
- SENTRY_ENVIRONMENT=development
- SENTRY_DSN
- SENTRY_PERF_SAMPLE_RATE
- AWS_ACCESS_KEY_ID=minio-access-key
- AWS_SECRET_ACCESS_KEY=minio-secret-key
- AWS_STORAGE_BUCKET_NAME=municipal-money
- AWS_S3_ENDPOINT_URL=http://minio:9000
- AWS_S3_SECURE_URLS=True
- AWS_S3_CUSTOM_DOMAIN
- DJANGO_DEBUG_TOOLBAR
- NO_INDEX
- BULK_DOWNLOAD_DIR=bulk_downloads_dev
working_dir: /app
depends_on:
- postgres
- minio
stdin_open: true
tty: true
minio:
image: "minio/minio:RELEASE.2019-10-12T01-39-57Z"
volumes:
- minio_data:/data
ports:
- "9000:9000"
environment:
- MINIO_ACCESS_KEY=minio-access-key
- MINIO_SECRET_KEY=minio-secret-key
- MINIO_DOMAIN=minio
command: minio --compat server data
minio-client:
image: "minio/mc:RELEASE.2019-12-17T23-26-28Z"
depends_on:
- minio
environment:
- MINIO_ACCESS_KEY=minio-access-key
- MINIO_SECRET_KEY=minio-secret-key
- MINIO_DOMAIN=minio
entrypoint: >
/bin/sh -c "
/usr/bin/mc config host add --quiet --api s3v4 local http://minio:9000 minio-access-key minio-secret-key;
/usr/bin/mc mb local/municipal-money;
/usr/bin/mc policy set public local/municipal-money;
"
volumes:
minio_data: {}
postgres_data: {}
munimoney_search: {}