forked from openstates/openstates-scrapers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
77 lines (74 loc) · 1.75 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
version: "3.5"
networks:
openstates-network:
name: openstates-network
volumes:
openstates-postgres:
name: openstates-postgres
external: true
services:
scrape:
build: .
environment:
- MYSQL_HOST=mysql
- DATABASE_URL=postgres://openstates:openstates@db/openstatesorg
- PYTHONPATH=./scrapers
- NEW_YORK_API_KEY
- INDIANA_API_KEY
- DC_API_KEY
- VIRGINIA_FTP_USER
- VIRGINIA_FTP_PASSWORD
volumes:
- .:/opt/openstates/openstates/
entrypoint: ["poetry", "run", "os-update"]
networks:
- openstates-network
mysql:
image: mariadb:10.3
# command: mysqld_safe --max_allowed_packet=512M
ports:
- "3306:3306"
environment:
- MYSQL_DATABASE=capublic
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
networks:
- openstates-network
ca-scrape:
build:
context: .
dockerfile: Dockerfile.california
environment:
- MYSQL_HOST=mysql
- DATABASE_URL=postgres://openstates:openstates@db/openstatesorg
- PYTHONPATH=./scrapers
volumes:
- .:/opt/openstates/openstates/
entrypoint: ["poetry", "run", "os-update"]
networks:
- openstates-network
ca-download:
build:
context: .
dockerfile: Dockerfile.california
entrypoint: /opt/openstates/openstates/scrapers/ca/download.sh
environment:
- MYSQL_HOST=mysql
volumes:
- .:/opt/openstates/openstates/
depends_on:
- mysql
networks:
- openstates-network
db:
image: "mdillon/postgis:11-alpine"
hostname: "db"
ports:
- "5405:5432"
environment:
POSTGRES_PASSWORD: openstates
POSTGRES_USER: openstates
POSTGRES_DB: openstatesorg
volumes:
- openstates-postgres:/var/lib/postgresql/data
networks:
- openstates-network