-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
76 lines (72 loc) · 2.04 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
version: '2.4'
services:
app:
env_file:
- .env.local
build:
dockerfile: Dockerfile.dev
context: .
container_name: lametro
stdin_open: true
tty: true
ports:
- 8001:8000
depends_on:
postgres:
condition: service_healthy
elasticsearch:
condition: service_started
volumes:
- .:/app
environment:
DJANGO_MANAGEPY_MIGRATE: "on"
# Uncomment the following variable to import the legislative
# boundaries that power the Board Members map
# DJANGO_MANAGEPY_IMPORT_SHAPES: "on"
entrypoint: /app/docker-entrypoint.sh
command: python manage.py runserver 0.0.0.0:8000
postgres:
container_name: lametro-postgres
image: postgis/postgis:14-3.2
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
environment:
POSTGRES_DB: lametro
POSTGRES_PASSWORD: postgres
volumes:
- lametro-db-data:/var/lib/postgresql/data
ports:
- 32006:5432
elasticsearch:
image: elasticsearch:7.14.2
container_name: lametro-councilmatic-elasticsearch
ports:
- 9200:9200
environment:
- discovery.type=single-node
- logger.org.elasticsearch.discovery=DEBUG
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
mem_limit: 1g
volumes:
- lametro-es-data:/usr/share/elasticsearch/data
scrapers:
image: ghcr.io/metro-records/scrapers-lametro:deploy
stdin_open: true
tty: true
depends_on:
postgres:
condition: service_healthy
environment:
DATABASE_URL: 'postgis://postgres:postgres@postgres/lametro'
SHARED_DB: "True"
OCD_DIVISION_CSV: '/app/lametro_divisions.csv'
command: sh -c 'pupa update --rpm=600 lametro people && pupa update --rpm=600 lametro bills window=7 && pupa update --rpm=600 lametro events window=7'
volumes:
- ./lametro/secrets.py:/app/lametro/secrets.py
- ./data/lametro_divisions.csv:/app/lametro_divisions.csv
volumes:
lametro-es-data:
lametro-db-data: